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.

  1. Click Product information management > Common > Product builder > Product models.

  2. Select a product model > click Open.

  3. Select the Tree tab in the lower pane.

  4. Right-click the Modeling tree node.

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

  6. Type the IF node description in the Description field.

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

  8. Click Test to test the code syntax.

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

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