on 12-11-2008 8:10 PM
Hi all,
I have to map an optional Source field to Mendatory Target fiels. If the Source Field is missing / empty, it needes to be filled with a "?". Can any body please suggest how to do this?
I tried using "Exists" mathod of graphical mapping to check for empty(SUPRESS) value, but its didn't worked.
Thanks
-Kulwant
Your mapping should be in the following order
1. Check if the source field is missing or empty (for doing this connect the source field to an 'exists' function and the output of this you have to feed to an 'if' function)
2. The 'then' part of the 'if' node should be connected to a 'equalS' function to check if the source field is empty (for this check you have to use another 'if' function) and if it is empty you have to feed the constant '?' to the targt field, and if it is not empty you have to feed the source field itself to the target field.
3. The 'else' part of the first 'if' node should be connected to a 'mapWithDefault' node and double click this node to set '?' as the default value. The output of this 'mapWithDefault' should be fed to the target field.
Edited by: Bharath Sai on Dec 12, 2008 7:01 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi...
You can do the mapping like
Constant? -
Then
SourceNode -
Equals----- If -
Constant(Empty)-----
SourceNode------Else
Map the above output to the below then condition.
then
Sourcenode -
Exists------- if -
TargetNode
Constant ?------else
Hope this will solve your query.
Regards
Leela
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
http://www.flickr.com/photos/30143464@N05/3101255702/sizes/l/
Here, I am checking if the source field has "" i.e the source field exists but it has "".
the map with default handles in case source field doenst exist at all
check the link. Hope its useful
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kulwant,
You have to use 2 If then Else
First IF then Else layout:
If -> sourceField -> Exist . equalsS -> true
- Then (goto the second IF then Else)
else sourceField -> mapWithDefault (give the default value you want to map)
Second IF then Else layout
check if the sourceField . equalsS Empty. If so, map a default constant. Else pass the sourceField as is.
I tried this out and it works fine.
Regards,
Balaji.M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can't you give the default value if nothing is coming up from the mapping..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.