Skip to content

CodeDescription

Purpose

Returns the description of a code/type combination from the DataFlex CodeMast table.

Syntax

CodeDescription(location, type, code)
Argument Required Description
location Yes Location and name of the DataFlex codemast table
type Yes Codetype (e.g. SHIPPING, REASONS, etc)
code Yes Code to be looked up (e.g. FEDEX, LUNCH, etc)

Example

return CodeDescription("Codemast.dat","SHIPPING",{OrderHeader.Ship_Via})

Notes

  • Should be used with DataFlex embedded database tables only. In an SQL (Microsoft SQL) environment, this CodeMast table should be converted to SQL, and the description can be better returned using the SQL() function.