# Provide Records and Storage information in the live app

**URL:** <https://forums.knack.com/t/provide-records-and-storage-information-in-the-live-app/8910>\
**Category:** Feature Requests\
**Tags:** uiux-live-app, app-home\
**Created:** [June 30, 2020, 5:19pm UTC](https://forums.knack.com/t/provide-records-and-storage-information-in-the-live-app/8910 "2020-06-30T17:19:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PascalBott09312](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@PascalBott09312](https://forums.knack.com/u/PascalBott09312)\
**Post date:** [June 30, 2020, 5:19pm UTC](https://forums.knack.com/t/provide-records-and-storage-information-in-the-live-app/8910/1 "2020-06-30T17:19:00Z")

</div>

In the current version there is no way to display the number of records and Storage of an app in the live version. That is only possible in the Builder  
In addition, it would be fine if we could defined the max number of records and Storage for each app :

Example :

App 1 : Max records : 5,000 / Storage : 500 Mb

App 2 : Max records : 10,000 / Storage : 2 GB

etc...

---

<div class="post-metadata">

**Author:** ![Shrey](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@Shrey](https://forums.knack.com/u/Shrey)\
**Post date:** [July 3, 2020, 6:14am UTC](https://forums.knack.com/t/provide-records-and-storage-information-in-the-live-app/8910/2 "2020-07-03T06:14:02Z")

</div>

Sure. For example, i created a new object called "Usage"

And these are the fields in it:

Then i added a new Page:

The Edit Record link is important as we are going to use this to update the usage data.

After this you should create a new (blank) Usage record, via the Builder.

Then go back to the "Usage Data" Page in the Live App and go to the Edit record link, to retrieve the Record ID.

(&nbsp; [https://xyz.knack.com/your-app#usage-data/edit-usage/{RECORD](https://xyz.knack.com/your-app#usage-data/edit-usage/%7BRECORD) ID}/&nbsp; )

One last thing to do after this is to create the code in the JS console:

&nbsp;

&nbsp;

$(document).on('knack-record-create.any knack-record-delete.any', function(event, view) {

&nbsp; let data = {  
&nbsp; &nbsp; field\_162: Knack.app.attributes.counts.total\_entries,  
&nbsp; &nbsp; field\_163: Knack.app.attributes.counts.asset\_size,  
&nbsp; &nbsp; field\_164: Knack.app.attributes.account.plan\_limits.records,  
&nbsp; &nbsp; field\_165: Knack.app.attributes.account.plan\_limits.storage  
};  
&nbsp; let headers = {'Authorization': Knack.getUserToken(), 'X-Knack-Application-Id': 'YOUR-APP-ID', 'X-Knack-REST-API-Key': 'knack'};  
&nbsp; let api\_url = "[https://api.knack.com/v1/pages/scene\_AAA/views/view\_BBB/records/{RECORD](https://api.knack.com/v1/pages/scene_AAA/views/view_BBB/records/%7BRECORD) ID}";  
  
&nbsp; $.ajax({  
&nbsp; &nbsp; url: api\_url,  
&nbsp; &nbsp; type: "PUT",  
&nbsp; &nbsp; headers: headers,  
&nbsp; &nbsp; data: data,  
&nbsp; &nbsp; success: function(response) {&nbsp;&nbsp;  
&nbsp; &nbsp; &nbsp; console.log("Usage updated!");  
&nbsp; &nbsp; }  
&nbsp; });  
  
});

&nbsp;

This code will fire every time a record is created or deleted in your app.

It will keep updating the one particular record in the "Usage" object, which you can then use anywhere, however you like.

&nbsp;

Hope this helps.

&nbsp;

---

<div class="post-metadata">

**Author:** ![PascalBott09312](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@PascalBott09312](https://forums.knack.com/u/PascalBott09312)\
**Post date:** [July 2, 2020, 10:27am UTC](https://forums.knack.com/t/provide-records-and-storage-information-in-the-live-app/8910/3 "2020-07-02T10:27:43Z")

</div>

Thank you Shrey but I a low code user :). How and where can I use these variable to get the information ?

---

<div class="post-metadata">

**Author:** ![Shrey](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@Shrey](https://forums.knack.com/u/Shrey)\
**Post date:** [July 1, 2020, 12:56pm UTC](https://forums.knack.com/t/provide-records-and-storage-information-in-the-live-app/8910/4 "2020-07-01T12:56:02Z")

</div>

and **Knack.app.attributes.account.plan\_limits.records** & **Knack.app.attributes.account.plan\_limits.storage** to retrieve the overall limits for your Knack account

---

<div class="post-metadata">

**Author:** ![Shrey](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@Shrey](https://forums.knack.com/u/Shrey)\
**Post date:** [July 1, 2020, 12:53pm UTC](https://forums.knack.com/t/provide-records-and-storage-information-in-the-live-app/8910/5 "2020-07-01T12:53:26Z")

</div>

Hey 398722061672, you could use the **Knack.app.attributes.counts.total\_entries** &nbsp; &&nbsp; **Knack.app.attributes.counts.asset\_size** &nbsp; variables to retrieve the no. of records and the utilised storage, respectively, for your app.
