LET
Assigns a value to a variable object.
Syntax
LET expression
Parameters
target | A global or local variable, a form field or menu item, a parameter, or a macro can be used. Subscripted (array) variables are valid. |
expression | Any value expression. The value of expression is assigned to target. Expression can include literals, constants, global or local variables, form fields, menu items, parameters, or fields in the current set. These objects can be combined using any of the arithmetic operators and functions. |
Comments
The LET command is used to assign values to variable objects. To assign values to a field in an EntitySet or relationship, you must use ADD, CHANGE, INSERT, or UPDATE (which can contain a LET subcommand). The LET command is not used to assign values to database fields.
An assignment expression is formed by enclosing the LET command in parentheses.
If expression evaluates to $Null and target is a macro, the macro is assigned the null string. (A null string is a string of zero length, which is not the same as the $Null property.)
Example
let var1[1]=1 var1[2]=2 var1[3]=3
let var1 = $Date var2 = $tolower(LastName) var3[2] = 123
An example of using LET to assign values to variables.
let
let
let <5> = $null
An example of using LET to assign values to macros.