cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping logic!

Former Member
0 Kudos

Hi experts,

I have a scenario where in a UDF returns 3 different values(TRUE,FALSE,E).

Based on these 3 values i need to map accordingly.

My mapping is as follows:

UDF -> FixValues(A1=TRUE,A2=FALSE) -> If TRUE -> ABC else -> DEF.

How to handle the value E coming from UDF?

If UDF returns E -> should ignore it. (Please note, target field should not receive the anything)

Any pointer will be of greate help.

Regards,

Rajkamal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi RajKamal,

If I am correct in understanding your question, then, your requirement is as follows:

If TRUE -> ABC

If FALSE --> DEF

If E --> nothing should go to target.

In this case, for E, don't put any value, just keep it blank in fix value function.

It should work.

Please post if you still have any query, somebody from SDN will help you out.

-Supriya.

Former Member
0 Kudos

Hi Supriya,

The req is we should not even send the blank value.. we should ignore it if the value return is E.

And also, the if- else condition after the FixValues cannot cast the blank value, it takes in only TRUE/FALSE.

Regards,

Rajkamal

rajasekhar_reddy14
Active Contributor
0 Kudos

Why you want go for Fix values here?? it is not rquired,you can handle the all logic in UDF it self or using mapping functions,

paste your UDF code here,we will try to alter the code ..

Regards,

Raj

Former Member
0 Kudos

Hi Raj,

PFB the UDF code:

if (lookup.equals(""))

{

return "E";

}

else

return (lookup);

The above code explicitly looks for values in one of the table, and returns as A1 or A2. If the table doesnot contain any value it returns E.

That is the reason am using FixValues as TRUE for A1 and FALSE for A2.

Regards,

Rajkamal

Former Member
0 Kudos

Hi RajKamal,

As Raja Sekhar has mentioned already why dont we stick to the udf? Instead of going for a value udf, can we not go for a queue/context udf and use result.addSuppress() for the 'E' case and result.addValue("ABC") for the "A" case and so on?

Regards,

Ninu

Former Member
0 Kudos

Hi

In UDF instead of E u can try with sUpPresSeD.

This will suppress the value u in target side..

Babu