T
Tom G
I have a repeating table. The first field is an ID field that I want to
auto-populate with an incrementing integer. The field is read-only.
I tried setting the default value for the field to be "max(.)+1" but that
generates a NaN when I create a new form.
I then tried "max(nz(.))+1", to treat blanks as zeroes (my form option is
already set to do that but it doesn't seem to be working). This avoided the
error, but the rows are all numbered "1".
I then tried creating a rule in addition to) a default value of "1". The
first two rows were correctly numbered "1" and "2" but every subsequent row
was also numbered "2", suggesting that MAX() is not working as I would
expect.
Is there a better was to do a incrementing field in a repeating table? Or
can someone spot the error in my approach? Or is this a known bug in
InfoPath? Thanks.
auto-populate with an incrementing integer. The field is read-only.
I tried setting the default value for the field to be "max(.)+1" but that
generates a NaN when I create a new form.
I then tried "max(nz(.))+1", to treat blanks as zeroes (my form option is
already set to do that but it doesn't seem to be working). This avoided the
error, but the rows are all numbered "1".
I then tried creating a rule in addition to) a default value of "1". The
first two rows were correctly numbered "1" and "2" but every subsequent row
was also numbered "2", suggesting that MAX() is not working as I would
expect.
Is there a better was to do a incrementing field in a repeating table? Or
can someone spot the error in my approach? Or is this a known bug in
InfoPath? Thanks.