views:

622

answers:

1

I have an element in the source schema of a map that contains a code. I am using this as an input to a database lookup functoid. The output of the database lookup functoid is being passed as an input parameter to a value extractor functoid, which is outputting a column value. So far so good all as expected.

My question is how do I handle no match? Would I get null out of the value extractor functoid and how could I default this to the original input code going into the database lookup functoid if no match was found?

A: 

Connect the 'Value extractor' to a 'Logical String' functoid and have that as input to a 'Value Mapping' functoid.

Also connect the same 'Logical String' functoid to a 'Logical Not' which goes into a second 'Value Mapping' functoid.

Add the default value to the second 'Value Mapping' functoid.

Connect both Value Mapping functoids to the same output node in the destination.

Tip! Make sure that you get the correct order on the two input paramters to the 'Value Mapping' functoids.

magnus
Spot on. Worked a charm. Thanks very much.
NeilE

related questions