Hello,
I have a problem when populating textbox with data from secondary data source xml.
I explain:
1- I have a repeating section with 1 dropdown listbox and 4 textboxes.
2- the dropdown listbox is linked to a field "nom" in an xml secondary data source file
3- when I select a name in the listbox, I would like to fill automatically textboxes in the item of the repeating section
here is the xml file:
<Questions>
<Question nom="question1">
<id>id_question1</id>
<type>QCM</type>
<duree>5</duree>
<difficulte>1</difficulte>
</Question>
<Question nom="question2">
<id>id_question2</id>
<type>QRM</type>
<duree>10</duree>
<difficulte>2</difficulte>
</Question>
<Question nom="question3">
<id>id_question3</id>
<type>QMeC</type>
<duree>15</duree>
<difficulte>5</difficulte>
</Question>
<Question nom="question4">
<id>id_question4</id>
<type>QSL</type>
<duree>30</duree>
<difficulte>4</difficulte>
</Question>
</Questions>
4- To do it I made a rule for each field to fill. This rule must fill the texbox associated with data matching the field "nom" selected. I do not want to display all question node in the form, only which ones selected in dropdownlist in the repeating section!
5- here is an example for a rule to fill "id" field:
xdXDocument:GetDOM("GetQuestionList")/dfs:myFields/dfs:dataFields/tns:GetQuestionListResponse/tns:GetQuestionListResult/Questions/Question/id[../@nom = xdXDocument:get-DOM()/my:mesChamps/my:section_question/my:groupe_question/my:section_extensible_question/my:nom_question]
or in a simple way:
id[@nom = nom_question]
6- the problem is that when I have only one section in my repeating section, all work very well! But when I have many sections in the repeating section, rules sometimes display data not matching the field "nom" selected!
It seems to appear when I select for the second time a field already selected above. In fact, data displayed match the first section fields and not which one asked.
Can someone help me to solve this problem?
Hope I clear enough to be helped! :)
Thanks