Back to Index |

Found Property For Reference Lookups

Many times you will need to know if the process actually found a record in one of your joined tables. This can be easily accomplished by using the Found property, which is available for all joined tables.

Take this job for instance:

As 'Sales Data' is read in, it will look up the matching keyed record in the Brand Code Lookup table. But how do you know if it actually found a match in code? Maybe you would like to move the Sales Data record to a Reject table if it does not find a match, or simply ignore it, or give the output a default value, such as "UNDEFINED".

The answer is, every joined table contains a property called Found. You can reference this in code in the following way, given the example above: ref.Found

Say, for instance, that you would like to include some code in the Filter so that only the Sales Data records get output to the Data Mart Table if a match is found in the Brand Lookup table. That code would look like this:

If ref.Found = True Then

Return True

Else

Return False

End If

Or, the simpler code might simply be:

Return ref.Found

See also: How to: Reference Lookups