cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XI Mapping- Filter rows based on source field value

Former Member
0 Likes
814

Hi I am trying to insert rows into a database. From all the rows in the source structure i will need to pick rows based on a source field, if the source field value matches a certain value 'WA' then that row needs to be mapped to the access structure of the target.

View Entire Topic
justin_santhanam
Active Contributor
0 Likes

Vinay,

Can you give the sample source payload - structure.

Best regards,

raj.

Former Member
0 Likes

Raj

Attached are the sample payloads i created to simulate my problem.

Source:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:test1 xmlns:ns0="urn:cop-city:test">

<row>

<parm1>C</parm1>

<parm2>1</parm2>

<parm3>10</parm3>

</row>

<row>

<parm1>A</parm1>

<parm2>2</parm2>

<parm3>20</parm3>

</row>

<row>

<parm1>Z</parm1>

<parm2>3</parm2>

<parm3>30</parm3>

</row>

<row>

<parm1>A</parm1>

<parm2>4</parm2>

<parm3>40</parm3>

</row>

</ns0:test1>

Result: after using satish's condition... Check if parm1 is equal to 'A' then createif.

But i had to change the context of parm1 to higher level.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:test2 xmlns:ns0="urn:cop-city:test">

<stmt>

<access>

<parm2>2</parm2>

<parm3>20</parm3>

</access>

<access>

<parm2>4</parm2>

<parm3>40</parm3>

</access>

</stmt>

</ns0:test2>

Satish thanks for thesuggestion.