How to Create a Simple Assignment Expression

Top  Previous  Next

A simple assignment evaluates an expression on the right side of the equal ( = ) sign and assigns it to the variable on the left side of the equal sign. The Formula Editor helps you build assignment expressions by providing access to all your valid variable names, plus immediate syntax checking.

Within the Application Generator, select a target procedure:

1.

Press the Formulas button.

2.

Select a Class in the list where you want to add the Formula, and then press the Insert button. The Formula Editor dialog appears.

3.

In the Name field, type a name for the formula.

4.

Optionally, type a description of the formula in the Description field.

5.

Press the ellipsis (...) button next to the Result field to choose the variable to which the result of the expression is assigned. You can choose a local, module, or global variable, or a data dictionary field.

6.

Create your formula on the Statement line.

You may type in the expression, you may use the Formula Editor's buttons, or you may use a combination of the two. The first component of an expression must be an operand, left parenthesis, or a unary minus (the negative sign).

7.

Optionally, press an Operands button for the first component of your expression.

8.

Optionally, press an Operator button for the next component of your expression.

9.

Continue adding components to your expression until it is complete.

10.

Press the Check button to check your syntax.

If the syntax is correct, a large green check mark appears to the left of the statement. If there is any incorrect syntax, a large red X appears.

11.

Press the OK button.