Configuring Rule Actions
When you add an action to a rule and the action contains the word configure with a dotted line, you can (and sometimes must) configure some details about the action, such as adding input and output mappings, applying a filter, and sorting data.
The examples below illustrate how to configure a rule.
Certain actions require configuration to execute. The Create method, for example, needs to know which properties of the SmartObject must be populated. Mappings are performed between the SmartObject properties and fields in your view or form. Use the Context Browser on the right to drag and drop items on the Input Mappings page or click the Auto Map button for this to be done for you. You can also clear the current mappings.
You can return and store values for later use by specifying values on the Output Mappings page. This page indicates if values must be stored and where. Use the Context Browser to drag and drop return properties of the SmartObject into the mapping destinations. Click the Auto Map button for this to be done for you.
When you use an action such as Set a control's properties, you can configure the control's properties using items from the Context Browser.
See the following topics for information on how to use some of the Context Browser items when configuring a rule:
- How To: Use The Error Event And Method
- How To: Use Mode Conditions
- How To: Use Parameter Events And Conditions
- How To: Set the Window Size of a subview
- How To: Use a form parameter to filter data on another form
- How To: Use SmartObject properties in a Hyperlink Expression to Navigate to a URL
- How To: Use Conditional Images in an Editable List View to Show Severity Indicators
- How To: Use Expressions to Perform Calculations in a List View
Use the toggle button to change the type of input. This allows you to use static values or drag and drop values from the Context Browser.
- When you use Boolean properties you can use any permutation of the following values. Any other Boolean value evaluates as FALSE:
- True, False
- 0, 1 (0=False;1=True)
- Yes, No
- You can populate the Expression property of a control with an existing expression from the Context Browser or the GUID of an existing expression.
- You can only map a drop down to the values the control can accept. Note that these values may be different from the display values for the drop down. For example, the Target drop-down of the Hyperlink control has the following display values: New Window, Current Frame and Current Window; but the corresponding value members are _blank, _self and _top (you can get these values by inspecting the drop down’s HTML).
When you use methods such as the Get List method, you can filter values using fields, operators and values. To add a filter, click Add and select the Field, Operator and Value to configure the filter. If you need more than one filter, click Add again to add another filter. You can remove filters by using the Remove and Remove All buttons.
Configure advanced filters by clicking the Advanced button. This allows you to add Expressions to create a more advanced filter in which you can group conditions. Each condition has a number and is shown in an expression. Use the conditions and expressions to build a statement to filter the data according to your needs. You can add multiple expressions and conditions to build the statement and add brackets by clicking in the boxes between each condition to group conditions which allows you to control the order of execution. A Preview of the full expression is available below.
- You can use input mappings to limit the number of records returned. This is useful when you have a growing number of records and performance is becoming an issue. The more records you can filter out before the results return to the server, the better the performance of the view or form will be.
- If you filter items by using parameters on the method first, the filters may not work properly. As a troubleshooting tip, supply parameters only, look at the result set, and then apply a filter to the result set.
Use the Sort function to order the results returned on a view or form. You can add multiple sort mappings, but keep in mind that sorting happens in the order listed. Use the Move up and Move down buttons to move the position of a sort. You can sort columns ascending or descending. In the example below the results are sorted by the Customer Name first and then the Customer Number.