LookupLoad
- Last UpdatedOct 29, 2026
- 1 minute read
This function loads an external file — typically, a delimited text file — that can be used to look up table values. One column of the file is designated as the keywords column, and another column is designated as the values column.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
LookupLoad |
File |
Synchronous |
Yes |
Supported |
Supported |
Supported |
Not supported |
Supported |
Syntax
LookupLoad(strFileName, numColKey, numColValue, strDelimiters)
strFileName
The file path and name of the external file.
Note: Follow the conventions of the target platform for the file path and name, and separators. For example, a file path in Windows starts with a drive letter and uses backward slashes as separators (C:\path\to\file), while a file path in Linux starts at the root directory and uses forward slashes as separators (/path/to/file).
numColKey
The number of the column/field that contains the keywords.
numColValue
The number of the column/field that contains the desired values.
strDelimiters
The delimiter that separates the columns/fields.
Returned value
This function returns the number of rows/lines in the specified file.
If the specified file cannot be found, then this function returns a negative number as an error code.
Notes
This function only loads the specified file; it doesn't do anything with the file. To use the file, call the LookupContains and LookupGet functions.
Also, to load another file, simply call this function again. Only one file can be loaded at a time, however; the new file replaces the old in the project's memory.
Examples
LookupLoad( "C:\Temp\customerlist.csv", 1, 4, "," )