Control and Form Properties Actions
Control properties and Form properties can be changed at runtime by configuring specific actions in the Rule Designer to provide the flexibility to change the properties of a control when an event has executed.
Control properties can be changed at runtime by using the Control Interaction section in the actions of the Rule Designer to provide the flexibility to change the properties of a control when an event has executed.
When the control properties are configured in the Properties panel of the Layout step, configuration is done in design time and applied at runtime before any rules are executed.
When using a Control Properties Action in the Rule Designer, configuration is done in design time and applied at runtime as part of a rule execution.
The following Control Properties Actions are available in the Rule Designer:
View level:
Form level:
- Create a View with the following controls:
- 1 Enabled Calendar control (Calendar)
- 1 Button
- 1 Disabled Calendar control (Calendar1)
- Go to the rules tab and add a rule
- Add an event such as When a control on a View raises an event (When the Calendar control is clicked)
- Add the Set a control's properties action
- Click on configure next to the action
- The value of the Calendar control's property can be transferred to the Calendar1 control's property as shown below. By dragging a control or control's property from the Context Browser onto the control in the Mapping Destinations, the field automatically changes to accept the value. Click on the Toggle button to change it back to a Yes/No field if required. Previous values will be removed when using the Toggle button.
- Click OK to save the configuration and Finish to save the rule
The above rule will transfer the Enabled status of the Calendar control to the disabled Calendar1 control when the Button is clicked:
After Button is clicked:
The Toggle button can be used to change the type of input as shown below. Explicit values or values from the Context Browser can be used.
The following needs to be considered when using the Control Properties Actions:
- Values mapped to properties must comply with expected values
- Boolean properties will accept any permutation of the following values:
- True, False
- 0, 1 (0=False;1=True)
- Yes, No
- Any Boolean value that does not fall within that range will be evaluated as FALSE
- The Source property of a Picture accepts an integer index that corresponds to the position that the specific picture was uploaded in.
Source property of a Picture:
- The green light (Picture 1) is the first picture uploaded, and will therefore have an ID of 1
- The orange light (Picture 2) is the second picture uploaded, and will therefore have an ID of 2
- The red light (Picture 3) is the third picture uploaded, and will therefore have an ID of 3
- The Expression property can be populated with a newly created expression, an existing expression (from the Expression Builder or the Context Browser tree) or the string representation of the GUID of an existing expression.
- Any drop down can only be mapped to accepted values which may not necessarily be the display values for the drop down. For example the Target dropdown of the Hyperlink control has the following display values as shown below: New Window, Current Frame and Current Window;But the corresponding value members are _blank, _self and _top (these values can be retrieved by inspecting the drop down’s HTML
- Validation is done on properties where text-only mappings have been done: How to use rules to change the properties of controls at Runtime
Feature | What it is |
---|---|
Set a control's properties |
The properties of a specified control will be set at runtime according to the configuration |
Set a subview control's properties |
The properties of a specified control on a subview will be set at runtime according to the configuration |
Set a View on a subform control's properties |
The properties of a specified control on a View on a subform will be set at runtime according to the configuration |
Set a subform control's properties |
The properties of a specified control on a subform will be set at runtime according to the configuration |
Set a Form control's properties |
The properties of a specified control on a Form will be set at runtime according to the configuration |
Set a View control's properties |
The properties of a specified control on a View will be set at runtime according to the configuration |
Execute a control's method |
The method of a specified control will be executed at runtime according to the configuration |
Execute a subview control's method |
The method of a specified subview control will be executed at runtime according to the configuration |
Execute a View control's method that was opened in a subform |
The method of a specified View control that was opened in a subform will be executed at runtime according to the configuration |
Form properties can be changed at runtime by using the Form Interaction and Subform Interaction sections in the actions of the Rule Designer to provide the flexibility to change the properties of a Form or subform when an event has executed.
When using a Set Form Properties action or Set subform properties action in the Rule Designer, configuration is done in design time and applied at runtime as part of a rule execution.
The Set the Form's properties action is available in the Rule Designer in the Form Interaction section:
and the Set a subform's properties action is available in the Rule Designer in the Subform Interaction section:
- Create a Form.
- Add a rule or edit an existing rule.
- Add the Set Form properties action for example. The same logic applies to the Set subform properties action.
- Click configure next to the action.
- Configure the Form property to be set at runtime for example the border size should change.
- Click OK to save the configuration and Finish to save the rule.
- When the Form initializes the border size of 14px will be applied. This can subsequently be changed with another rule event.
- HTML color codes should be used in the Appearance section to change colors. Type text for the name of the color or the specific hexidecimal code if a new color is required.
View properties can be changed at runtime by using the Form Interaction and Subform Interaction sections in the actions of the Rule Designer to provide the flexibility to change the properties of a View or a View on a subform when an event has executed. These settings can be executed on each individual View.
When using a Set a View's properties action or Set a View on a subform's properties action in the Rule Designer, configuration is done in design time and applied at runtime as part of a rule execution.
The Set a View's properties action is available in the Rule Designer in the Form Interaction section:
and the Set a View on a subform's properties action is available in the Rule Designer in the Subform Interaction section:
- Create a Form.
- Add a rule or edit an existing rule.
- Add the Set a View's properties action for example. The same logic applies to the Set a View on a subform's properties action.
- Click configure next to the action.
- Configure the View property to be set at runtime for example the View should be collapsible.
- Click OK to save the configuration and Finish to save the rule.
- When the Form initializes the specific View will contain the icon to change to collapsed or expanded. This can subsequently be changed with another rule event.
- When changing the Default property to expanded or collapsed, only the default will change when opening that same Form again. The change is not affected on the current Form.
- Advanced properties are not available for mapping.