In Cumulative Update 6 for Dynamics AX 2012 R2 we have included a new expression editor forthe Product configurator. You can use the editor to create expression Constraints,Conditions and Calculations. (Calculations is a new concept, which wasintroduced in Cumulative Update 6, and was described in a previous post in thisblog).
The screenshot below shows the expression editor as it will appear when you clickthe drop down for the expression column for a new Constraint or a new Condition.
Constraint expression editor
The editor has a text field, in which you can type an expression, and a tabular listsection in the lower part of the form. The tabs in the list represents theelements or symbols you can include in an expression Constraint. They are:
The All symbols tab displays all entries from the three other tabs (a combined list).The items that appear in the list are filtered depending on the user input inthe Expression field. In the example below, the user has started writing an Implies constraint (“im”). The only twomatches are the Implies and the Times operators, and thus theyare the only symbols remaining in the list.
You can add operators, attributes or values to an expression by typing, or by selecting anelement in the list with the mouse (double-click, press the Enter key or usethe Insert symbol action in the list action pane to insert the symbol). You can alsopress Alt + Arrow down to set focus on the grid, then use arrow keys to move inthe lists and then press Alt + I to insert symbols from the grid. If you movethe cursor in the expression field, you can press F5 to refresh the lists inthe symbol grid.
The editor attempts to validate the syntax as you build an expression. If you type in anunknown text and hit the space bar, an error is displayed. Below is an examplewhere the user typed in “XYZ”.
You can also use the Validate action to validate the syntax at any point.
Calculation expression editor
When the expression editor is used for Calculations, there are more operators available and you caninclude attributes of any type except free text. The screenshot shows the availableoperators if you type “s” in the Expression field.