Insert an IF node
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, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
The IF node is useful when a decision must be based on a single logical condition.
Note
This information applies only to Product builder.
Click Product information management > Common > Product builder > Product models.
Select a product model > click Open.
Select the Tree tab in the lower pane.
Right-click the Modeling tree node.
Click New > IF node. A new node will appear at the bottom of the modeling tree. To insert a node into a particular position in the tree, drag it from the node list displayed on the left.
Type the IF node description in the Description field.
In the Code field, write the logical condition that the IF node should be tested for. The condition must be stated in the form of an X++ expression. For a description of X++ expressions, see the Microsoft Dynamics AX Developer’s Guide.
Click Test to test the code syntax.
Click OK to save the code and close the IF - condition form. An IF node will be created and will include two subnodes:
THEN node
ELSE node
Under the THEN node and ELSE node, add subnodes that represent the parts of the item configuration that depend on the value of the condition for the IF node.