How to pull out data from a repeating table and make a sum of them

im a little stuck here and dont know how to make this work…


as you see on this picture a have a repeating table there calculates services price for each line…

but where im stuck is that when i try to make a sum for each line in the “subtotal” i cant figure how to pull the data out from the repeating group to make a sum of them,

can anyone help me out? :slight_smile:

When manipulating your repeating group list of things you should see something like that : repeating group’s list of things:each item’s {parameter}

In that way you can get a list of prices from your list of things. (or any other data field you may need)

From that, you just sum the list of prices or do whatever else you need.

hi @bonjour_17
thank you for quick repsonse
but my issue is that the price is only a text element with a calculation in
like this:

so it is not a data field because the total price for each line is varibale depending on amount and price per unit…

so is there any way i can tak the value of the text element in the repeating group and make a sum of that?

@bonjour_17
i can only get so far in the expression becasue its not a field

You can not reference to a text within a repeating group.

You’ll have to do the calculation again for the sum.

Or you might want to create objects into the database for each line and then refer to those elements for any further calculation.

hmm… how do i then make the calculation for each line and put in to the databse…?

because these lines are only temporary lines there gets added from values of a product and service database… so when i click on on them from a list they get added to the lines you see above… but as soon as the offer gets created it deletes the lines from the database and clear data ready to a new offer getting created

I haven’t done it before, but i’ve seen some users using plugins to do that!

yeah i tried some of the calculations plugin… but they doesnt show a result… so its either me there doesnt understand how they works or that they just doesnt work :sweat_smile:

doint the calculation in a text element is the only thing i have got to work as intended

hi @agoulas
thank you for you post… i have tried now to go study more about the states… and it seems the states have to be triggered by a button or a link before working… that doesnt work for me unfonuatually… i need it to be calculated automatic when new values get entered… as it does now in each line when qty get typed in

You would create a work flow “when a input value has changed” then set states. Look at this editor. Rhbsandbox | Bubble Editor

hmm… i have tried to take a look at the sandbox you sendt… and that is actually how i want it to be… but in you setup i cant see any calculation or how you have got it to calculate it…

tak a look at my editor setup here… i use a long calculation formular to get the subtotal… for each line… but how i get it down in a grandtotal i cant figure out…

All credit to @robhaigh1 .

But in his example you update a state to get the grand total. He has the state directly on the the Text Grand Total named “Value”

He also has states inside of the repeating group cells container.

And as you can see in his workflows he updates those states accordingly.

@agoulas
thank you for you help… i got it to work now with chnaging values

but do you know how it can be posible to also calculate the subtotal without chnaging the input values if they already are printed from the databse?