I want to get the sum of values from a column in the expression editor and I want to use that expression object in an interface to show my Sum which I calculated.
Discussion posts and replies are publicly visible
I am not really sure what you are looking for. But to calculate the sum of all values of a field in a list of records have a look at this code snippet:
a!localVariables( local!test1: { { item: "stapler", name: "Mike", countryId: 1 }, { item: "printer", name: "Larrys", countryId: 2 }, { item: "printer", name: "Larry", countryId: 2 }, { item: "laptop", name: "Mike", countryId: 1 }, { item: "glass", name: "Mike", countryId: 3 } }, sum(local!test1.countryId) )
You can query the data for the column from the database and then you use the sum() for addition.
In the above, for a Order Line Item record, the data is queried for a column and then addition has been done
Thank you
This is working