O
oiTomas
InfoPath newbie here, so any help would be greatly appreciated!
I have some code I am using to set the value of a field in a repeating table
based on a database call. The call to the DB works fine and the value is
updated correctly in the first row. However, when I create a second or third
row, the code always updates the field in the first row. Also, when I create
a second or third row, the value I am setting programatically nulls out.
Somehow I am not specifying the update relative to the current row. Question
is: How do I specify the update to target the row the user is curretnly
working on and not the first?
This seems to be the offending line of code:
XDocument.DOM.selectSingleNode("/my:myFields/my:group1/my:group2/my:qtr_status").text = overall_status
BTW, the structure of the local data source looks like this:
myFields
currentdate
group1
group2
field2
qtr_status
Any help would be appreciated!
I have some code I am using to set the value of a field in a repeating table
based on a database call. The call to the DB works fine and the value is
updated correctly in the first row. However, when I create a second or third
row, the code always updates the field in the first row. Also, when I create
a second or third row, the value I am setting programatically nulls out.
Somehow I am not specifying the update relative to the current row. Question
is: How do I specify the update to target the row the user is curretnly
working on and not the first?
This seems to be the offending line of code:
XDocument.DOM.selectSingleNode("/my:myFields/my:group1/my:group2/my:qtr_status").text = overall_status
BTW, the structure of the local data source looks like this:
myFields
currentdate
group1
group2
field2
qtr_status
Any help would be appreciated!