Bind rows in a dynamically table based on a condition

Avatar

Avatar

deboraha5380687

Avatar

deboraha5380687

deboraha5380687

06-02-2018

Hello community,

I created a table that grows dependent on the data in the XML schema.

The XML schema looks like this e.g.:

<ITEM>

<ID> 10</ID>

<FIELD1>Test1-10</FIELD1>

<FIELD2>Test2-10</FIELD2>

<FIELD3>Test3-10</FIELD3>

</ITEM>

<ITEM>

<ID> 20</ID>

<FIELD1>Test1-20</FIELD1>

<FIELD2></FIELD2>

<FIELD3>Test3-20</FIELD3>

</ITEM>

<ITEM>

<ID> 30</ID>

<FIELD1>Test1-30</FIELD1>

<FIELD2>Test2-30</FIELD2>

<FIELD3>Test3-30</FIELD3>

</ITEM>

These item positions should be printed in a table. Therefore, I bind the fields in the first growing row to itemID, field1, field2 and field3.

But now I got this results: If there is no value in Field 2 in the Item ID 20, then there is simply the next value of Item ID 30 displayed. See following example:

Item IDField 1Field 2Field 3
10Test1-10Test2-10Test3-10
20Test1-20Test2-30Test3-20
30Test1-30Test3-30

How can I make sure that the values in the fields match the item ID? Which method can be used for this? I think to set presence to hidden is the wrong way because I want to display the value in the row below...

Can you help probably Bruce BR001​?

Thanks in advance.

Best regards,

Deborah

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

_Bruce_Robertson

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

268

Correct Answer

371

Avatar

_Bruce_Robertson

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

268

Correct Answer

371
_Bruce_Robertson
MVP

12-02-2018

Hi Deborah,

This should just work, what have you got as a binding expression for Field 2.

Maybe worth making the binding expression for the row of the table to something like, "$.ITEM[*]", so all the fields are relative to that, this would mean that Item Id will have a binding expression of "$.ID"

The binding expressions are on the Binding tab of the Object palette.

Bruce

Answers (1)

Answers (1)

Avatar

Avatar

deboraha5380687

Avatar

deboraha5380687

deboraha5380687

12-02-2018

Hi Bruce,

thanks so much! It works now. I put as you adviced the relative binding in the row.

Deborah