I have an InfoPath timecard form that has a repeating section within a repeating section:
myFields
Section1
> Section1a
>> RepeatingTable1 (weekday:Sun - Sat)
>>> Section
>>>> Section
>>>>> RepeatingTable2 (multiple codes/lines per day)
>>>>>> Field
Thus employees can enter multiple codes per day:
Monday: code 435 hours 4
code 550 hours 4
Tuesday: code 435 hours 8
Wednesday etc.
I’m trying to summarize the code totals (using preceding-sibling) so that it would look like:
Code 435 = total hours 12
Code 550 = total hours 4
etc
I can figure out the totals but is showing the codes more than once with the same totals
Code 435 = 12
Code 550 = 4
Code 435 = 12
etc
So I'm trying to do a condition/rule that says "If there is a preceding code x (435) then hide the total" but I can’t get the preceding-sibling to work – I’m sure it is due to the XPath and the nested repeating fields. I have tried all kinds of variations and paths:
preceding-sibling::/RepeatingGroup/RepeatingField
../preceding-sibling::/RepeatingGroup/RepeatingField
../preceding-sibling::/my:RepeatingGroup/my:RepeatingField
../preceding-sibling::/my:RepeatingGroup[1]/my:RepeatingField
../preceding-sibling::/my:RepeatingGroup/my:RepeatingField[1]
and many others
Any help would be great...Thanks!
Pat