Expression (form) [AX 2012]

Updated: January 31, 2011

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Click Product information management > Common > Product builder > Product models. Select a product model number, and then click Open to open the Product model form. Click the Tree tab in the lower pane. Click Modeling tree, right-click, and then click New > Simple node.

Use this form to perform simple calculations in the modeling tree. The calculation result is stored in one of the product model's variables.

At the top of the form, you specify the variable that should receive a new value from the calculation. At the bottom, on the Expression tab, you create an expression to calculate the value.

The following tables provide descriptions for the controls in this form.

Tab

Description

Expression

Specify an expression that yields the value that the selected variable should receive. The expression is built on several lines, each of which contains an operand and an operator.

Button

Description

Test

Check the code's syntax.

Field

Description

Description

Type a short description of what this simple node does.

Variable

Select the variable that should receive the result of the calculation.

NoteNote

If the variable is an array, select the specific array element that you want. Typically, when you must select variables in the Product Builder, there is a special field for the array index. However, there is no special field for the array index in this form.

Type

Select whether the operand that is specified on this line is a fixed value or a variable. The operand is the value of the Operand field.

Operand

Specify an operand in the expression that you are building. Depending on the value that you select in the Type field, the operand can be either a fixed value or one of the product model's variables. If you specify a variable that is an array, you must select the specific array element that you want, not just the name of the variable.

When the Type field is set to Variable, you can view a list of available variables and array elements by clicking the arrow next to the Operand field.

NoteNote

When the Type field is set to Value, you must consider the data type of the values that you enter. Text values must be enclosed in single quotation marks ('). Otherwise, the compiler interprets the text as a variable name, and you receive a compilation error when the rule is validated. By contrast, numeric values should not be enclosed in quotation marks.

Operator

Specify an operator that connects the current line with the next line to form an expression or part of a larger expression. The following operators are available. They are listed in order of precedence.

*

Multiplication

/

Division

+

Plus

Minus

>

Greater than

<

Less than

>=

Greater or equal

<=

Less or equal

=

Equal

!=

Not equal

and

Logical and

or

Logical or


Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

Show: