on 09-07-2011 5:59 PM
Hello All,
I have below requirement. In the source structure I have field say "WORDS". In the target mapping I would like to get this logic.
IF WORDS = 'ABC' OR WORDS = 'EFG' OR WORDS = 'XYZ'.
ASSIGN WORDS to Target field
Else
Assign 'UNKNOWN' constant to target field.
Endif.
Can anyone provide me some clue how to achieve above functionality using graphical editor functions.
Regards
Krishna
Krishna
Use fixValues and generate "true" for the inpuit WORDS = 'ABC' OR WORDS = 'EFG' OR WORDS = 'XYZ'
And make default as "false" for other values. now use a IF function to pass the input value for true and 'UNKNOWN' in case of false,
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
or comparing WORDS with ABC, EFG or XYZ use constant, OR(boolean) functions then use ifelse.
Words
or
ABC(Constant)
or
EFG(Constant)
or
XYZ (Constant)
if else TARGET
UNKNOWN(Constant)
if u still face prob let me know.
Thanks,
Enivass
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
Try using the below UDF, we can use graphical functions but you have add more functions which doesnt look good;
String words="";
if(a.equals("abc")||a.equals("efg")||a.equals("xyz"))
{
words=a;
}
else
{
words="UNKNOWN";
}
return (words);
- Muru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use combination of equals(text), "OR" (boolean function), ifthen else functions to achieve ur output...simple approach will be..
words
------------equals
constant(ABC)
---OR ---OR(mapping of 2nd input to OR)---IFTHEN ELSE( WORDS-----then, constant(UNKNOWN)---ELSE)----OUTPUT
words
----------equals
constant(ABC)
mapping of 2nd input
words
----------------equals-----2nd input to OR
constant(XYZ)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.