Binding and XML Data

Avatar

Avatar

meem23

Avatar

meem23

meem23

30-10-2020

Hi Experts,

I’m creating a table and would like to use XML data that is used in a different form to populate fields.

 

This is an example of what the table would look like.  The highlighted data is what would be populated from the XML data.  The table is static and not dynamic.

meem23_0-1604064203957.png

 

This is an example of what the xml looks like:

<dataroot>

     <Schedules>

          <ScheduleID>MO1</ ScheduleID >

          <FieldA>9.0000%</FieldA>

          <FieldB>5.0000%</FieldB>

     </Schedules>

     <Schedules>

          <ScheduleID>MO2</ ScheduleID >

          <FieldA>8.5000%</FieldA>

          <FieldB>4.5000%</FieldB>

     </Schedules>

</dataroot>

 

Can I bind the fields?

meem23_1-1604064203962.png

 

How would I go about doing this if FieldA is needed for Qtr 1 row and FieldB is for Qtr 2 row? Binding fields rather than using JavaScript code would be best, but if a script is needed, can I get some guidance in what this script would look like as I'm not a programmer and have little scripting knowledge.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

_Bruce_Robertson

MVP

Avatar

_Bruce_Robertson

MVP

_Bruce_Robertson
MVP

30-10-2020

Hi,

 

If your table is static then could you have two body rows.  The binding expression for MO1 in the first body row would be "$.Schedules[0].FieldA" , MO2 would be "$.Schedules[1].FieldA", then for the second row use "$.Schedules[0].FieldB" and "$.Schedules[1].FieldB".

 

Bruce

Answers (0)