How can I "sum" (summary of detail) dynamically when use display user control of the list used

I have a list of rows (LIST1). The source is a Filter. In a following block after the list, I want to sum (like a TOTAL) a numeric field. THen I created a datacell (DATACELLTOTAL) with the SUM function putting the same conditions of the filter en el source list (LIST1).
But if I use the display control of LIST1 like SEARCH,FILTER, the rows displayed change (that is normal), but ek DATACELLTOTAL doesn't change. I want that DATACELLTOTAL change dynamically when use display control SEARCH, FILTER of the LIST1.

Thank you a lot.

Javier

Hi @Javi-1285, thanks for your post! I'm happy to help :slight_smile: :honeybee:

I'll first note that the list controls will only change how and what data is displayed, however it does not change the data stored in that list object. If you wish to calculate a value based on selected criteria, you will need to create screen variables that dynamically updates the list data as well.

So for your use case, you can create fields for users to specify criteria and calculate the sum based on that list. This is how it looks:

I made a couple of editable fields where users can specify start and end dates of the data:

The list object refers to a table I set up (that has a value column and a date column), and it updates based on the start and end date specified by the user in the app:

I then made a variable for the sum, which calculates the sum of the values displayed in the list (sum of the values column):

And this is how it looks in action:

Hope this example helps! Let us know if you have any other questions. :honey_pot: :honeybee:

Hello Alyssa
Thank you for your help. I understand you, but I don't want to use a custom filter like (date range, like your example). I only want to use the display control (SEARCH, FILTER) like:
image

I don't have control on them. Then how do I calculate the SUM dynamically?

image

Best regards
Javier

Hi @Javi-1285 :honey_pot:

The controls for the list change what data is displayed / visible, but do not change the underlying data (meaning that the data values remain the same even with different data visible).

I'll pass on the idea to our team as an improvement request (to be able to also dynamically calculate values that are displayed). For the meantime, the solution I provided above of using the screen variables would achieve your goal of dynamic calculations on the screen.

I hope that helps clarify! Let us know if you have any other questions. :honeybee:

HEllo Alyssa:
Excelent!!. Thanks for you help. !!!!

Best regards
Javier Cullas

1 Like

You're welcome, @Javi-1285, always happy to help! :smiley: :honey_pot: