Getting the value of what a text display list is showing

I have a text display list that is compiled partly using an aggregate statement to get the total value of transactions from a different database. What I would like to be able to do is display a total for the selected records. For example in the “Status” popup menu I can select a subset of the records. I would like to know what the total value is in just those accounts that are selected. I expect that internally Panorama is storing the data being displayed in a variable. Is it possible to access it? If so, then I could use an arraynumerictotal( in conjunction with arraycolumn(

I realize I could do it by placing the initial selection into a variable and then have a procedure redefine the variable based on the selection, but since that is already built into the text display object, I wondered if there was a simpler way.

The Text List is not storing the displayed text in a variable, or anywhere else for that matter. It’s simply calculating the list and displaying it, but not keeping the list.

However, that’s ok - what you need is the aggregate( function.

text display list that is compiled partly using an aggregate statement

I have no idea what this means. Panorama has no such thing as an aggregate statement.

Maybe you mean you are calculating each Amount with an aggregate( function? So maybe using a loop or arrayfilter? If so, then I would suggest that you use whatever formula you’re using now but instead of putting that formula into the Text List, put it into a variable. Then you can have the Text List display the variable, and you can also have further code to calculate the grand total with arraynumerictotal( as you are thinking.

Yes, I meant the aggregate( function. Thanks for confirming my suspicion on the text list. By the way, the aggregate function is incredibly useful, especially in accounting related applications.

the aggregate function is incredibly useful

I agree!

I have a thought though - I wonder if the summarytable( function might be useful for your application? You might check that out.