cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get target field

Former Member
0 Kudos

HI

I have a mapping field. I have a field XYZ in the source. It's mapped to ABC in target. If XYZ doesn't exist then ABC = 001. If XYZ exists and if its values are 1, 2 or 3, then ABC = 003

How to meet this requirement ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

XYZ - MapWithDefault(001)-FixValues(1,2,3 - 003) -> ABC

or

XYZ-FixValues(1-003, 2-003,3-003 and default 001) -> ABC

standard function "FixValues" is available in Conversions category.

Venkat.

Edited by: Venkat Anusuri on May 13, 2010 10:56 AM

Former Member
0 Kudos

It works for the second condition. But when XYZ doesn't exist, it doesn't give the value 001. Mapwithdefault doesn't work

Former Member
0 Kudos

Hi

use the second condition.. with Mapwithdefault function

XYZ--> MapwithDefault->FixValues(1-003, 2-003,3-003 and default 001) -> ABC

Regards

Ramg

Former Member
0 Kudos

do it like this

if exists (xyz) & xyz = 1 or xyz = 2 or xyz = 3

abc = 003

else

abc = 001

you can easily do it using standard functions or if you prefer you can do udf

code is almost there in the above lines i have written.

Edited by: mimranacc on May 14, 2010 7:54 AM

balaji_pichaimuthu
Active Participant
0 Kudos

use if then else condition.. If xyz> exist function->... then use fix values else assign with the constant 001. then assign the output of the if else then part to target field.. it will work..

Regards,

balaji

Answers (1)

Answers (1)

Former Member
0 Kudos

if XYX exists then use FixValues function and there you can give you fix values input and output Else give the constant value to the output.

Regards,

NJ