Form Arithmetic ? How to read and add table values?

I have a payments table in my sql database which is connected to a form. All of the payments entered in that database are tied to a user_id and are returned. So I have it setup where if I am viewing a specific user profile I can see all the payments that user has made in the payments bootstrap table. What I am trying to do now is get it to where all of the payments entered for that user in the database can be added up to show a total sum. I am not sure if Wappler would have a way to do this easily. I know I need to have a server connect using a api to get the values from the database I want.. The issue is how do I get it to add say all the values returned by the api and give me the sum? any ideas ? Could this be done using a Data Iterator ?

There's a sum formatter available, so select your repeat expression click the formatter button, select collections > sum and pick the property to sum.

1 Like

Thank you so much Theodor, The help was appreciated. I am still a bit new to this. I feel like that was a bit obvious and can't believe I missed it. After some fiddling it worked perfectly.

1 Like