cancel
Showing results for 
Search instead for 
Did you mean: 

mapping help...

Former Member
0 Kudos

Hello,

below condition i need to apply.

<tag1>

  <tag2>.........0..U

       <tag3>........1..1

if tag3 dont not exist then tag2 should not pass. <tag2> is 0..u so when i use exist and create if condition the data is coming only once.

can any give me logic for this.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Just give the graphical view of what Muniappan said

Output:

Former Member
0 Kudos

thanks for the update, its working.

if i want to add another condition to same mapping like need to check for amount value is 0.0 and tag3 exist then i need pass data to target side.

Former Member
0 Kudos

Hi Chinna

Do it in the below way

Output:

Former Member
0 Kudos

Hi,

there is small issue in mapping.... actual i need to check tag 3 exist and if amount is zero then data should not pass to target.

and another issue is.....tag3 is 1..1 and target side root node is 0...999999

so when i check the condition and use remove context till have issue in occurrence.

if i change the occurrence of tag3 to 0....99999 then hope issue will get resloved......let me know if i am correct.

Former Member
0 Kudos

Hi

Do it like below

output:

As far as my understanding, the occurrence of the field tag3 should be 0..1.

Former Member
0 Kudos

hi thanks for the help.

the standard functions are not working for the number of occurrences.

below is the structure.

Root 0....unbounded                                                        Root 0 ...unbounded.

   events 0...unbounded

       countries 1...1

       total 0....unbounded.

          amount 1

          totals

Now the condition is.....if countries tag is not available and  amount is zero and under total tag we have totals.....if the tag not there.......target side root should not come.

i have done mapping.

countries ----exists-------------------------------------

amount-------

                  equals-----not------                                        and--------createif----removecontext-----root.

constant-------                               and ---------------

   (0)

   totals --------exist------------

regards,

chinna

Muniyappan
Active Contributor
0 Kudos

Hi Chinna,

not sure if you have achieved this.

is this your requirement?

Regards,

Muni.

Answers (2)

Answers (2)

Muniyappan
Active Contributor
0 Kudos

Hi,

can you try to use Remove context after create if.

tag3-->exists-->createif-->removecontext-->tag2

tag3-->tag3

abranjan
Active Participant
0 Kudos

Hi Chinna,

I don't know how clearly I understood your requirement, but based on what I understood, you can try this once and see if it works -

For the target element of tag2:

Use ifWithoutElse where if condition will be on tag3 (tag3 EXISTS)

if this holds true, then pass tag2 forward to the target element.

If this doesn't work out, it would be easy to have a look at the source/target structure, please provide if possible.

Regards,

Abhishek