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:


Press the Formulas button.


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


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


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


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.


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).


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


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


Continue adding components to your expression until it is complete.


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.


Press the OK button.