Create calculations
Important
This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2
This topic describes how to create calculations. Calculations enable a product designer to handle decimal values in a product configuration model in Microsoft Dynamics AX.
Prerequisites
The following table shows the prerequisites that must be in place before you start.
Category |
Prerequisite |
---|---|
Related setup tasks |
Calculations can be used in a product configuration model to calculate the configuration values for a product. For an overview of the setup process for configuration models and the related tasks, see Setting up and maintaining product configuration models. |
Create a calculation
You create a calculation for a product configuration model. A calculation consists of an expression and a target attribute. For more information, see Calculations for product configuration models.
To create a calculation, follow these steps:
Click Product information management > Common > Product configuration models.
Select a product configuration model, and then click Edit.
In the Constraint-based product configuration model details form, on the Calculations FastTab, click Add to add a new calculation.
In the Target attribute field, select one of the attributes that are included in the product configuration model.
In the Expression field, click the drop-down arrow or press Alt, Down Arrow.
In the Expression constraint editor form, on the All symbols tab, double-click a symbol or press Enter to enter the symbol in the Expression field.
Use the same method to add attributes, operators, and values to the expression. For more information about how to use attributes, operators, and values, see Expression constraints and table constraints.
Example of a calculation
In the following example, the target attribute is of the Boolean type, and the calculation uses an If expression:
If[(decimalAttribute1 / decimalAttribute2) < 1, True, False]
This expression returns a value of “True” to the target attribute if decimalAttribute2 is greater than or equal to decimalAttribute1. Otherwise, the expression returns a value of “False.”
Related tasks
Create an expression constraint for a product component
Technical information for system administrators
If you don't have access to the pages that are used to complete this task, contact your system administrator and provide the information that is shown in the following table.
Category |
Prerequisite |
---|---|
Configuration keys |
No configuration key is needed for this task. |
Security roles |
To use calculations, you must be a member of the Product designer (BOMProductDesigner) security role. |