I have a table that is needs to be populated with xml data. The number of rows can change based on a selection in a drop down. I can get the table to create the correct number of rows based on the node count from a text field that contains xml data. Below is what I am trying to do.
1. User selects a manager from a dropdown list. The dropdown list is populated from a webservice and uses the manager's id# as an index value.
2. Based on the selection in the dropdown, the manager id# is passed to an invisible text field and then a webservice is executed to get that selected manager's direct reports. This result is passed as XML into another text field.
3. Based on the node count of the direct reports xml data, I have a for loop that adds the appropriate number of rows to the table.
4. Problem: I can't get the data from the xml to populate the rows in the table. Here is the code I am trying to use to poplate the rows in the table (this is done on the Exit of the dropdown list (see below). I don't get any errors, just no data in the table.
Thank you in adavance!
Make sure that you click the Repeat Subform for each data item on the binding tab for the subforms that represent repeating rows. This will cause a [*] to be appended to the repeating nodes in the binding expression.
Sorry I didn't see that the results were coming from another WS call. You will have to load the data into the Datadom then parse from there. The code can be a little complicated, if you send the form and some sample XML from the 2nd WS call I will see if I can get it to work for you.
You can send it to LiveCycle8@gmail.com
Include a brief descritpion of the issue please.
Thank you again for your help. I have outlined your fix below.
Originally I was trying to do .addItem to the table, not thinking that it was used for added to a drop down or list. What Paul found was that I should have been using .rawValue instead. Once I tested tried it everything worked fine!
Paul saves the day again!