on 02-19-2011 12:59 PM
HI Forum users,
my source structure is
root
charc
value
my target structure is
detail
no
desc
properties
value1
value2
value3
in my scenario root value will be 1-unbounded charc value will be changing when context changed, but my requirement is the charc corressponding values i need to pass the properties-value1,value2,value3.
eg:
root
charc = color
vaue= 10
root
charc= length
value=20
root
charc=width
value=30
for this it have condition that is if charc= color then pass the value other wise pass blank spaces
then output values: properties-value1=10,:if condition is true
properties-value2=blank spaces,if condition is false
properties-value3=30,if condition is true
how to do this one in the mapping and in reciver jms file content conversion fixed length
Edited by: SWATHIP on Feb 19, 2011 1:59 PM
This requirement is very simple.
Use standard function equals to check whether charc has color then use boolean if else and map it to target field.
If condition map it to directly to the target field
else means pass empty string using constant.
Sarvesh also mentioned also very similar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for your response. but my requirement is when root context changed i am not able to pass the charc values to corresponding target element
eg:
root
charc=color
value=10
output vale of value1is 10
it should have to check all the values of charc and map to the corresponding target values
target fields are vaalue1,value2,value3.
output like this:10,blankspaces(when if condition is false),30
please reply to me fastly
Try with "IfElse", "equalS", & "Constant" function e.g.
if charc equals Constant("color") then map value ELSE map Constant ("empty") to VALUE1
Apply same logic for VALUE2 & VALUE3.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.