Skip to main content

Hello, I am running into an issue that I feel should be easy to resolve, but I can’t seem to nail it down.

 

I have a repeating section

Inside this repeating section I have a data driven drop down for users to choose a product.

Then I have a field for them to enter a quantity of that product, and next a field that displays the price of that product based on the same external data that drive the product list.

I have a field that calculates the total cost of that line item.

IE.

All of this works great, however I would like to Sum the total of all records, because if the form reaches a certain value I would like to add an extra approval.

 

I can’t seem to Sum the Total Cost field outside of the Repeating Section.

 

Thank you in advance for any assistance you can provide,

Greg

@gwickstead this post most likely will help you get to your objective.  A quick search for a topic, will most likely find answers to your questions.   

 


Hi @gwickstead 

I did a little mockup on a form for you.

Basically repeating section with product name, unit price, qty, and line total.

Then outside the repeating section an order total control.

 

Create a rule for the repeating section.

This uses the current row within the repeating section form controls to multiply and fill the line total value.

pForm].]Repeating section orders].]Current row].]Unit Price]*]Form].]Repeating section orders].]Current row].]Quantity]

 

Create a form variable to sum the line total. Be sure to selection the line total collection rather than current row.

 

Lastly create a rule for the form which populates the order total control.

I trigger this by the form variable being filled.

 

And here is the preview

 

Cheers,
Gavin


@Gavin-Adams Thanks Gavin, I’ll try this out today and mark this as the best answer when I get it working.

 

@Sasan I actually did try to search for it, but I wasn’t able to quickly find an answer, but I’ll review your linked search as well.


Thanks Gavin!

Data types were a little finnicky for me as I needed to convert the cost to a number value and then needed to use the rounding function to force a decimal in one location as well, but this totally worked for me!

Thank you!


Reply