Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adding Rows and Data in Table Problem

johnqdaily
Level 4
Level 4

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!

John

0 Replies
pguerett
Level 10
Level 10

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.

Paul

johnqdaily
Level 4
Level 4

Paul,

I made the change but it's still not working.

Thanks,

John

johnqdaily
Level 4
Level 4

I have verified that I am getting the desired data from the XML data but for some reason

it's not populating the field on the table.

Thanks,

John

pguerett
Level 10
Level 10

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.

Paul

johnqdaily
Level 4
Level 4

Paul,

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!

Thanks,

John