I have a drop down list which is inside a repeating section. That is, the user can choose an employee name from the drop down, then click "Insert item" and that will bring up another drop down with employee names from which the user may choose another name. The user can do this for as many users as needed, each time bringing up a new drop down.
Now for the repeating section in a repeating section part. I have a repeating section (separate from the one mentioned above) in which I get the ID of a an item and then provide the user with text boxes to provide feedback on that item. (I'll call this the "outer" repeating section for lack of a better term). I will have an indeterminate number of work items so I have made it a repeating section. Within that repeating section, I would like multiple users to be able to fill in text boxes so I have created another repeating section (within the outer one) with a textbox for feedback as well as a textbox for the user name.
My goal is to have the user select names from the drop downs mentioned in the first paragraph of this post, then have the user name appear in the text box in the (inner) repeating section mentioned in the second paragraph. I also want to make sure that the number of repeating sections created for the feedback/tester name section doesn't exceed the number of users selected from the drop downs in paragraph #1.
I used this approach to make sure that the number of repeating sections is not greater than the number users selected:
http://www.bizsupportonline.net/infopath2007/programmatically-count-total-amount-repeating-sections-infopath.htm
However, the problem I am having is that iter.Count is incremented whenever I insert *either* repeating section. How do I differentiate between clicking insert on the outer and inner sections?