set

Examples


The set statement assigns the value of an expression to a field or variable.

To simplify sanScript code, the set statement isn’t typically used. Instead, values of fields and variables are set directly using the equals sign (=).


Syntax

set item to expression

Parameters

item – The field or variable that’s to be set to a value.

expression – The value to be assigned to the field.

Comments

The field can have any control type, but the expression should have the same storage type as the field. If you use the set statement to set the value of a field in a table that isn’t open, the set statement will open the table.


Documentation Feedback