WordLookup(Masterfile: String, LookupWords: String, AnyWords: Boolean, PartialWords: Boolean[, Inactive: Boolean]): MemoryTable
Looks up the words in Lookup Words, in the Masterfile, and returns a Memory Table containing matching results. Lookup Words is a space delimited string containing the words to be looked up.
When Any Words is True, the results will be an "OR" search, and will contain records with at least one of the Lookup Words. When Any Words is False, the results will be an "AND" search, and will contain records with all the words specified in Lookup Words.
For example, if you have indexed the Name and Address fields for AR Customers or AP Creditors, and you enter 'Jones' and 'Auckland':
True, returns 'Jones Furniture Ltd, Christchurch', 'Jones Furniture Ltd, Auckland' and 'Smith's Furniture, Auckland'.
False, returns only 'Jones Furniture Ltd, Auckland'.
When Partial Words is True, the results will include all words starting with the Lookup Words. When Partial Words is False, the results will contain only exact word matches in Lookup Words.
For example, if Lookup Words contains the word 'and':
True, Accredo will return 'Anderson and Co.' and 'J. Andrews Ltd', but not 'Peter Sands Ltd' or 'Harland Homes'.
False, Accredo will return only 'and'.
The optional parameter Inactive determines whether to search inactive records.
WordLookup function syntax has these named arguments:
Parameter |
Description |
Masterfile |
Required. The name of the masterfile to search. |
Lookup Words |
Required. A list of space delimited words to be looked up. |
Any Words |
Required. When True, looks for any words in the Lookup Words. When False, looks for all words in the Lookup Words. |
Partial Words |
Required. When True, looks for all words starting with the Lookup Words. When False, looks for exact word matches in Lookup Words. |
Inactive |
Optional. When True, searches inactive records. Defaults to False. |