Lookup field value using variable (not inter-record)
I'd appreciate ideas on a solution for how to perform a lookup of a field value in a Table, but not for an inter-record lookup (where you could use Lookup() or Exists(), but rather when the value you want to lookup is in a script variable.
I am trying to load files using FOR Each File in filelist(...) and the number of files is quite large (many 100's). I have a table that contains files I want to exclude (table is called 'ExcludeFiles' and has a column called 'FileName'). So I would like to do this:
FOR Each File in filelist('....')
IF IsNull(Lookup( 'ExcludeFile', 'ExcludeFile', '$(File)', 'ExcludeFiles')) Then
... process the file
However, Lookup() is not working here. Nor could I get Exists to work. I gather because both are intended for inter-record lookups.
Any ideas on how I can look for a match in a resident table when the matchvalue is in a variable (such as $(File) in this case)?