I have a read-only grid that displays data retrieved using the record data function. The data appears as expected. However, I need to calculate the Total Amount based on the "Amount" column in the grid, and this total should be displayed outside the grid in another card layout.
The issue is that using the record data function, I'm unable to access the data in a separate local variable to calculate the Total Amount. Although I can use the query record type function to obtain the data and calculate the total amount, this approach is not considered best practice.
How can I calculate the Total Amount while using the record data function?
Please Give me any Solution for this
Discussion posts and replies are publicly visible
laxmipavanik0001 said:Although I can use the query record type function to obtain the data and calculate the total amount, this approach is not considered best practice.
According to whom?
Hi Mike Schmitt ,If we have a large amount of data in record type (over 5000 rows), querying the record type will fetch all the data into the interface, which will impact performance.
In your case, the custom grid seems to be the only option to use the same data reference at multiple places.
laxmipavanik0001 said:querying the record type will fetch all the data into the interface
But if you're only wanting the column sum for the first page, then you would only be querying the current page of data. And if you want some calculation of a sum of the entire (5000+ row) data set, then the "current page" thing is irrelevant anyway and you should just be using a query with Aggregation parameters added in order to perform that calculation.
In no case would there be a need to query all 5000 rows of data into any interface.