How to get Order's Total from Database

Hi,

This is a test app to ilustrate my doubt.

I have many rows in a thing and each row is an item order. I need to multiply all items by its qty and then sum every row to get the order total amount.

I could no figure out how to do this math.

Could anyone help me?

Tks

Rodrigo

1 Like

Can you publish the public editor link?

I’ve made some changes. In the data, I’ve added a new field on the orders: “subtotal”. When a new entry is created, the subtotal needs to be calculated. The total value will then be the “RG’s orders’s List of orders’s subtotal:sum”.

Great, it eases everything.
tks!

1 Like

Thanks. You will use ‘calculate formula’ > select sumproduct from dropdown > enter ‘unit-price’ and ‘qty’ as the lists.

Well, that’s one another way to do it

1 Like

Hi Everyone!

So I created a table and have used an RG to showcase fields from the table. Works great!

On screen, I allow users to toggle (Yes/No), select stuff, and provide a score for each row… Works great!

However, I am unable to sum up the scores at the bottom.

So, I added fields to my table and am storing the calculated sums of each row in my table. Fine…

I am still at a loss on how to sum up the totals from the table field and show it on a field outside the RG. I have tried the :sum feature. Is it some basic stuff I’m missing here? Does the total field need to be inside the RG maybe? Setting state is not working either and I am unable to access fields inside the RG in the workflow

Has anyone come across this ?