Good afternoon,
I have a repeating section, where contains two relevant number fields. The first is where the user inputs a number, and the second totals it, adding that number with the previous total of the last section, placing it in this section's total.
myFields
yearrepeatpanel
yearrpanel
numberapproved
totalnumapproved
(xpath for totalnumapproved: my:myFields/my:yearrepeatpanel/my:yearrpanel/my:totalnumapproved)
This is a repeating section, not table.
I tried a bunch of xpath scripts to add them. However, each one adds the first section's total with the current number, instead of the previous section's total.
For example, if I place the number 10 in the first section this sets the total (I made a condition for the first year) to 10.
In the second section, I place 20, which sets the total to be 30 (as it should). However, by the third and subsequent section, it just adds the first total. So if I place 30, I am expecting 60, however, all I receive is 40. This keeps this way for all later sections.
Of the xpaths that I used were:
preceding::my:yearrpanel/my:totalnumapproved + ../my:numberapproved
preceding-sibling::my:yearrpanel/my:totalnumapproved + ../my:numberapproved
../preceding::my:yearrpanel/my:totalnumapproved + ../my:numberapproved
../preceding-sibling::my:yearrpanel/my:totalnumapproved + ../my:numberapproved
Thank you in advance,
Shlomo