GetLookupListValue

Syntax: GetLookupListValue(TableName, Key, KeyValue)

Arguments:

  • TableName is the lookup table name.
  • Key is the key to look up in the table.
  • KeyValue is the string that will hold the extracted key value.

Return Type: Integer

1: Success

0: Key does not exist

-1: If the function returns an error. For example, when the List table does not exist, or when no List data has been loaded.

Description: Looks up the Key in the TableName, and sets KeyValue to the extracted value.

Example:

toDate is a string;
fromDate is a string;
value is a string;
serviceId is a string;

serviceId = Left(CRTRAN24.pan, 16);

if ( GetLookupListValue("FREQUENT TRAVELERS", serviceId, value) = 1 ) then {
                fromDate = Mid(value, 0, 8);
                toDate = Mid(value, 8, 8);

if (Date_Convert(CRTRAN24.transactionDate) >= Date_Convert(fromDate) and 
 Date_Convert(CRTRAN24.transactionDate) <= Date_Convert(toDate)) then {
 SuppressCase(SERVICE);
}

}
If sub-tenancy is enabled, the above rule can be rewritten as:
toDate is a string;
fromDate is a string;
value is a string;
serviceId is a string;
serviceId = Left(CRTRAN24.pan, 16);
if ( GetLookupListValue("FREQUENT TRAVELERS", concat(serviceId,concat("_",CRTRAN24.clientIdFromHeader)), value) = 1 ) 
then {
                fromDate = Mid(value, 0, 8);
                toDate = Mid(value, 8, 8);
if (Date_Convert(CRTRAN24.transactionDate) >= Date_Convert(fromDate) and 
 Date_Convert(CRTRAN24.transactionDate) <= Date_Convert(toDate)) then {
SuppressCase(SERVICE);
}
}
  • www.fico.com