Page 1 of 1

How can I set a default vale when a lookup fails?

Posted: Fri Sep 19, 2008 4:29 am
by tbtcust
Hello all.

How can I set a default vale to a field when there is a lookup failure?

I using a Lookup Stage to find matches between master and reference data. The goal I to append a field to the master data file with data from a field from the reference data were there matches. When there is no match I need to append a "0".

How can this be done using a Lookup Stage? I have all but append code in place.

Thanks in advance for your help.

Posted: Fri Sep 19, 2008 6:05 am
by shaonli
In the lookup use CONTINUE in lookup failure condition so that u pass record when there is mismatch also.Now next to lookup use transformer check whether the field extracted from reference link is null ornot.If it is null then put ) else the field of Ref link.

Thanks
shaonli

Posted: Fri Sep 19, 2008 7:42 am
by tbtcust
Thanks shaonli that works. I was tiring to solve in the wrong place.