Adding rows to a repeating table within a repeating section

S

Shyamal Gurazada

I have a repeating section containing a drop-down for the list of categories
and a repeating table with a single column called "Question". The repeating
table is populated with "Questions" for the selected "Category" from a
secondary datasource using
XDocument.View.ExecuteAction("xCollection::insert", "group1_1").
This works fine only for the 1st row in the repeating section. Subsequent
rows in the repeating section continue to update the repeating table
"group1_1" since it's hard-coded in the script.
Question: how can we determine the ID ("groupX_y")for the newly inserted
repeating table so that it can be correctly populated when the drop-down
(belonging to the newly inserted row) is clicked?
 
A

Andrew Watt [MVP - InfoPath]

I have a repeating section containing a drop-down for the list of categories
and a repeating table with a single column called "Question". The repeating
table is populated with "Questions" for the selected "Category" from a
secondary datasource using
XDocument.View.ExecuteAction("xCollection::insert", "group1_1").
This works fine only for the 1st row in the repeating section. Subsequent
rows in the repeating section continue to update the repeating table
"group1_1" since it's hard-coded in the script.
Question: how can we determine the ID ("groupX_y")for the newly inserted
repeating table so that it can be correctly populated when the drop-down
(belonging to the newly inserted row) is clicked?

Shyamal,

The current() function may be what you need.

Do a search in Script Editor help and look at the results in the MSXML
5.0 topics.

Andrew Watt
MVP - InfoPath
 
S

Shyamal Gurazada

Thanks, I'll give it a shot...


Andrew Watt said:
Shyamal,

The current() function may be what you need.

Do a search in Script Editor help and look at the results in the MSXML
5.0 topics.

Andrew Watt
MVP - InfoPath
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top