@Set (Formula Language)

Assigns a value to a temporary variable for use within a formula.

Syntax

@Set( variableName ; value )

Parameters

variableName

Text. The name of a temporary variable.

value

Text, number, time-date, time-date range, or list thereof. The value you want to give to variableName.

Usage

With Release 6, you no longer need to declare the variable receiving the assignment prior to setting its value with @Set. For R5 and earlier clients, declare the variable by assigning it a null value at the beginning of the formula:

TemporaryVariable:=""

Examples

  1. This formula determines whether the FirstName field is blank. If so, it sets the variable FullName to the concatenation of the Title field with the LastName field, as in "Ms. Tsen." If the FirstName field contains a value, the variable FullName is instead set to the concatenation of the FirstName with the LastName, as in "Mary Tsen."
    Full Name:="";
    @If(FirstName=""; @Set("FullName"; Title + " " + LastName); @Set("FullName"; FirstName + " " + LastName))
  2. This example assigns FirstName and LastName to the first two elements of a list named FullName.
    FirstName := "Foo";
    LastName := "Bar";
    @Set("FullName"; FirstName : LastName)