Sumif of values on repeating table

M

MStillLearning

I have a textbox and a repeating table with 2 columns. Column 1 has a
dropdown with three possible choices: A, B, C. Column 2 has a textbox with a
numerical value. I would like to set the value of the textbox equal to the
sum of all values in column 2 where the corresponding value in column 1 of
that row is equal to A.

If I were doing this in Excel, the formula would be
"=SUMIF(A3:A7,"=A",B3:B7)". I know that XPath 1.0 doesn't have if statements
so I can't use that to write in the formula. And I tried setting rules, but
I think there are issues because it is in a repeating table. I'm sure I
could write some code to do this, but I'm trying not to write code to show my
non-technical users that they can do this without having to learn to code.
Any suggestions?

Here is an example to further illustrate what I'm trying to do: A user has
filled out my form, and has entered data in 5 rows of the repeating table.
The table now looks like this:
a 100
a 500
c 300
b 400
a 500
The value in my textbox should be 1100.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top