You are here: Field Rules Reference > Field Rules Summary > TblLkUp

TblLkUp

Use this field level rule to find the record in a table file that matches the first specification you supply. After the system finds that record, it uses the offset you specify to get a key. It then uses the key to look up a final record and return the result.

Specify the table file you want to use in the FSISYS.INI file, as shown here:

< Data >

TblFile=.\deflib\TBLFILE.DAT

Keep in mind that all tables you specify in the TBLFILE.DAT file are loaded into memory sequentially. This is then used to search for the final record. If your search mask and key are not unique, you may end up with an incorrect result.

For instance, in the TBLFILE.DAT file you could see a list of the files similar to this one:

.\deflib\ADETAILS.TBL

.\deflib\AGENTINFO.TBL

.\deflib\AQUESTION.TBL

.\deflib\FDETAILS.TBL

Specify the source file you want the system to search in the File field by entering a number that represents the position of the file in the list. For instance, if you want a field to look something up in the AGENTINFO.TBL file, you would enter two (2) in the File field.

     
Note The Record property is not part of the XDD layout. If you leave the File property equal to zero (0), the system uses the table index value in the XDD.

Here is an example:

Field options

You can use the Mask field to specify a default look up value. It is not a standard mask like that used in the Move_It rule.

     
Note The size of a table row is set in the MaxExtRecLen option in the Trn_File control group. The maximum size is 1024 characters.

To use this rule, these rules must be in the AFGJOB.JDT file:

;CreateGlbVar;1;TblLstH,PVOID;

;LoadTblFiles;1;;

See also