Showing results for 
Search instead for 
Did you mean: 

Generate the Element on target if the value exists in Source element

Former Member
0 Kudos


i have requirement where i have to generate the target element if the value exists in Source element

suppose if i have a value in <name>test</name> then generate the element on target side <name>test</name>

if i dont have value on source side <name></name> then i dont want to generate the element on target side

how i will achieve that


Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos
                ---------> equalS ----> Not -----> IfWithoutElse   ----------------Target
Constant(blank)                                    THEN---Source

Its working for me...rather i tested the logic:)

I hope that your target element has at least 0..1 cardinality...else will give an error...



Edited by: abhishek salvi on May 6, 2009 9:30 AM

Answers (6)

Answers (6)

Active Contributor
0 Kudos

Hi S V,

constant()/                   name--->then/

dont give any thing in the constant.


Former Member
0 Kudos

Hi S V,

Try this...........

First change the occurance of element <name> to '0..unbounded'.

Now do the mapping,

name & -





Check this link to know much about Node functions.



Edited by: P.Ravi Varma on May 6, 2009 11:10 AM

Former Member
0 Kudos

Try to use the createIf functionality of Node function, make sure that min occurence should be '0'


If Name(Source) exist --> createIf --> Name (target)

Former Member
0 Kudos

Kindly check this link has provided an example


<h5>in ur mapping u should not give any value there and use not after equalS std function<h5>

Or u can use mapping like this

 name(Source Field)--------equalS------------not---------ifWithoutElse--------------name(target Field)
              constant()/                                                        Source/

for constant dont give any value
target field occurence 0....unbounded

Former Member
0 Kudos

you can use createIf function for this

make sure that the cardinality of target element/node is 0...1


Active Participant
0 Kudos

Hi ,

Please have a look at this link which might be of help to you.

Also do have a look at this blog


Its very helpful

Best Regards

Edited by: Prakash Bhatia on May 6, 2009 5:13 AM