Type
Lookup Function

Purpose
The anylookup function lookup a field value in a table using ad hoc query and no relationship

Syntax
anylookup("tablename?query", "fieldname")

Returns:
A text value of the field given with the value of the first record in the query

Usage:
anylookup("DQLs?ID=/'DQL000123/'","DQL")

Examples:

execdql(anylookup("DQLs?ID=/'DQL000123/'","DQL"))

Returns the value of the DQL field in the table named DQLs and the ID="DQL000123" and use the value returned as the code in an execdql