Value (form)

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. On the Action pane, click the Develop tab. In the Rule group, click Validation. Click the Actions tab > click the Calculated button. Use this form to construct an expression that will be evaluated and then assigned to the selected variable. You can do this either on the Overview or Code tab.

Note

This information applies only to Product builder.

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

Tabs

Tab

Description

Overview

Construct the expression as a set of expression lines.

Code

Write the expression as an X++ function that returns the desired value. If you do this, the expressions entered on the Overview tab, if there are any, are not used.

Buttons

Button

Description

Validate rule

Test the syntax of the expression when you have finished editing it.

Transfer to program code

Transfer an expression from the Overview tab to the Code tab. In other words, you can start with a line-based expression and then transfer it to X++ code later, if you find that this is more convenient.

Fields

Field

Description

Type

Select whether the operand specified on this line (that is, the content of the Text field) is a fixed value or a variable.

Text

Specify an operand for the logical expression you are building. Depending on the value you selected in the Type field, the operand can be either a fixed value or one of the product model's variables.

If the Type field is set to Variable, you can obtain a list of available variables from the drop-down list in the Text field.

Note

If you specify a variable group that is an array, you must also specify the array index in the Index field.

Index

If you specified in the Type field that the operand on this line is a variable, and if the variable you selected in the Text field is an array group, specify the array index.

Note

The array index is the position number of the array element that is relevant for the current expression.

Operator

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

* /

Multiplication, division

+ -

Plus, minus

> < >= <=

Greater than, less than, greater or equal, less or equal

= !=

Equal, not equal

Variable

Select variables to use when you create an X++ expression in the Code field.

Index

If the variable you selected in the Variable field belongs to the array group, type its position number in the group.

Description

Type a description of the variable you selected in the Code field.

Code

You can write X++ code that returns the value that you want to assign to a variable. For an explanation of X++ syntax, see the Microsoft Dynamics AX Developer's Guide.

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