Skip to main content
July 12, 2024
Question

Readonly Grid

  • July 12, 2024
  • 14 replies
  • 0 views

/resized-image/__size/640x480/__key/communityserver-components-multipleuploadfilemanager/5d32e8f2_2D00_67fb_2D00_46e6_2D00_8cff_2D00_9dcc2b6c0050-89589-complete/pastedimage1712731195444v1.png

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

    14 replies

    July 12, 2024

    Do you want to do a total of all rows available in table or page wise total?

    July 12, 2024

    Hi [mention:7ad60a9badc744fcb7271774e4decc42:e9ed411860ed4f2ba0265705b8793d05] ,
    Amount column is there in grid, I want to do sum of amounts which are present in my grid 
    and display the total amount field in rich text field.

    konduruc733182
    July 12, 2024

    Do you have any requirement of showing this in a card specifically or is it possible to use the a!kpiField() provided the record data and the measure?

    jakubf0002
    July 12, 2024

    i think you can still have local variable that will be just sum of index of property. Try this Sum(index(yourecordtype, recordtype.fileds.fieldname)).

    I would avoid query db again as this may have negative impact on page performance.

    July 12, 2024

    Hi [mention:c3d2a744edf5417e87f66abdfd79b628:e9ed411860ed4f2ba0265705b8793d05] ,
    I have tried but the data is coming in grid by using Record data,
    so I need to take sum from amount which is in grid

    mikes0011
    Brainy
    July 12, 2024
    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?

    July 13, 2024

    Hi [mention:b45a4f6a20b14a008e4e0ec732a8bf98:e9ed411860ed4f2ba0265705b8793d05] ,
    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.

    July 13, 2024

    In your case, the custom grid seems to be the only option to use the same data reference at multiple places.