Syntax:
Then: xx=FIELDVAL(lookupname,fieldno)
"lookupname" is the name of the lookup file. Use a dash "-" to represent the current file.
"fieldno" is an expression designating the field number for which you want the name.
Return value is the contents of the specified field.
Version Ref: 4.5
Description:
Returns the contents (value) of the specified field in a lookup file.
Example:
Retrieves the contents of a lookup field and places it in variable aa.
Then: lookup inv=arinvoice k=2 i=a -nx
Then: aa=fieldval (inv,"5")