Hi,
My first newbie question. I have an Infopath 2010 form with repeating table group2 containing field1, 2, 3,
and 4. Group2 is nested in another repeating table group4 that also contains field5. Field5 has an initial
value used to set field2 if field2 is on the first row of the nested table.
/my:myFields
/my:group3
/my:group4 - repeating table
/my:field5
/my:group1
/my:group2 - repeating table
/my:field1
/my:field2
/my:field3
/my:field4
Field1 has the default value formula:
count(../preceding-sibling::my:group2/my:field1) + 1
This works correctly to return the row number of the nested table.
Field4 has the default value formula:
field2 - field3
Field2 has the default value formula:
../../my:field5 | ../preceding-sibling::my:group2[1]/my:field4[(../my:field1 < 1) + 1]
This is not working correctly as it only returns the initial value from field5 no matter what the row number
is. I need the field5 value returned for the first row, but otherwise I need the value from field4 of the
previous row.
A variation of this formula works correctly on a different, but similar Infopath form that has a repeating
table with fields1, 2, 3, and 4, but in this case the table is not nested in another repeating table. Field5
exists outside the one repeating table.
/my:myFields
/my:field5
/my:group1
/my:group2 - repeating table
/my:field1
/my:field2
/my:field3
/my:field4
../../../my:field5 | ../preceding-sibling::my:group2[1]/my:field4[(../my:field1 < 1) + 1]
Thank's for any help with this.