on 2008 Mar 13 4:41 PM
Hello,
I am trying to use graphical mapping for below scenario.
I have two fields X and Y in souce and Z in the source. If X has the value it should map to Z and If X is empty then Y should map to Z.
is any graphical function to check this.
Thanks,
Srinivasa
Request clarification before answering.
Hi
u can use the followin UDF.
the input to this function will be ur three source fields(a,b,c)
for(int i=0;i<a.length;i++)
{
if(!a<i>.equals(""))
{
result.addValue(c);
}
else if(a<i>.equals(""));
{
result.addValue(b);
}
}
if u still face the problem please reply me back.
Thanks
Rinku
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello rinku,
Thank you very much.
Thanks,
Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can anybody give java function for this.
Thanks in advance,
Srinivasa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What exactly the exists will check. I am getting allways true if i give value or not to X.
This means that exists will check whether node exists or not. And it will not checkthe value. is there any other function to check.
Srinivasa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
My X filed is 1...1
even if i give desription or not, the exists is showing the same thing. i think exists function is right or not.
i want to see Y only if X value is empty. If i have X i should see X
Not sure what is wrong.
thanks,
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I am getting like below. Xvalue is what ever i am giving in X field.
Exists in Exists out
SUPRESS false
X value true
Xvalue false
Thanks,
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I am trying with Exists function. But, the result is not coming as expected.
the four corners of if corners are pointed like below
X -- Exists --> if
X --> then
Y --> else
4th corner pointing to Z
What is wrong.. if X has no value it should take calue of Y.. But it is happening.
Please suggest.
Srinivasa K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Srini,
Follow this logic.
X---->mapwithDefault[No Value] & Constant[No Value]----->eQuals---->IF THEN ELSE--->Z
THEN----->Y
ELSE----->X
Additional Info
Don't use Exists function , if you are node sure whether the parent node of X,Y will occur in source. You know what I mean,
Root 0..1
X 0..1
Y 1..1
In the above example, if the Root node doesn't occur then it will throw an error.
So I would suggest you to use, MapWithDefault if the root node is 0..1, if not go with exists as friedns suggested above.
Hope it helps!
raj.
Edited by: Raj on Mar 13, 2008 12:05 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Srinivas,
Use exists function to check whether exists or not. If X exists and the length is greater than zero then you map X else you map Y.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try using the exist functionality. First vheck fi the X is exisiting then pass the value to Z or else pass the value of Y
x- exists - ifelse - output
Regards
Vijaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
30 | |
8 | |
8 | |
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.