Server Rules
You can use server-side rules when a view, form, subview, or subform loads to enable or disable controls, enable or disable the visibility of controls or views, collapse or expand a view, or change the appearance of a form based on certain parameters. Using server-side rules to change the form before it's sent to the browser can help to reduce the number of back-and-forth calls to the server, reduce view and form load times, avoid any flickering effect when controls are rendered by the browser, and improve the experience of using the form.
When you select a server event, the rule's conditions and actions are filtered and show only those that are supported by the event. You can use parameter conditions to validate the content of a view, form, subview or subform, and configure its properties. You can also execute another server rule. Use the following examples for when to use server events, conditions and actions:
You can find the server rule events in the Server Events group of the Rule Designer.
Type | Rule Definition | Example |
---|---|---|
View | When the server loads the View | Enable a control when the server loads the view |
View/Form | When the server loads a subview | Enable a control when the server loads a subview |
View/Form | When the server loads a subform | Change the visibility of a control when the server loads a subform |
View/Form | When the server loads a View on a subform | Expand a view when the server loads a view on a subform |
Form | When the server loads the Form | Change the appearance of a form when the server loads the form |
Form | When the server loads a View | Collapse a view when the server loads a view |
You can find the server rule conditions in the Parameter Conditions and Logical Conditions groups of the Rule Designer.
Type | Rule Definition | Example |
---|---|---|
Parameter Conditions | a Form parameter has been specified | Execute a rule if a form parameter is not blank, such as if Manager is true, then enable the Manager Comments control. |
Parameter Conditions | a Form parameter has not been specified | Execute a rule if a form parameter is blank, such as if Manager is not specified, then disable the Manager Comments control. |
Parameter Conditions | a Form parameter has a specific value | Execute a rule if a form parameter has a specific value, such as if Number is 1000, then change the visibility of a control. |
Parameter Conditions | a Form parameter does not have a specific value | Execute a rule if a form parameter is not a specific value, such as if Number is not 1000, then change the visibility of a control. |
Parameter Conditions | a subform parameter has been specified | Execute a rule if a subform parameter is not blank, such as if Manager is true, then enable the Manager Comments control. |
Parameter Conditions | a subform parameter has not been specified | Execute a rule if a subform parameter is blank, such as if Manager is not specified, then disable the Manager Comments control. |
Parameter Conditions | a subform parameter has a specific value | Execute a rule if a subform parameter has a specific value, such as if Number is 1000, then change the visibility of a control. |
Parameter Conditions | a subform parameter does not have a specific value | Execute a rule if a subform parameter is not a specific value, such as if Number is not 1000, then change the visibility of a control. |
Parameter Conditions | a subview parameter has been specified | Execute a rule if a subview parameter is not blank, such as if Manager is true, then enable the Manager Comments control. |
Parameter Conditions | a subview parameter has not been specified | Execute a rule if a subview parameter is blank, such as if Manager is not specified, then disable the Manager Comments control. |
Parameter Conditions | a subview parameter has a specific value | Execute a rule if a subview parameter has a specific value, such as if Number is 1000, then change the visibility of a control. |
Parameter Conditions | a subview parameter does not have a specific value | Execute a rule if a subview parameter is not a specific value, such as if Number is not 1000, then change the visibility of a control. |
Parameter Conditions | a View parameter has been specified | Execute a rule if a view parameter is not blank, such as if Manager is true, then enable the Manager Comments control. |
Parameter Conditions | a View parameter has not been specified | Execute a rule if a view parameter is blank, such as if Manager is not specified, then disable the Manager Comments control. |
Parameter Conditions | a View parameter has a specific value | Execute a rule if a view parameter has a specific value, such as if Number is 1000, then change the visibility of a control. |
Parameter Conditions | a View parameter does not have a specific value | Execute a rule if a view parameter is not a specific value, such as if Number is not 1000, then change the visibility of a control. |
Parameter Conditions | a View parameter on a subform has been specified | Execute a rule if a view parameter on a subform is not blank, such as if Manager is true, then enable the Manager Comments control. |
Parameter Conditions | a View parameter on a subform has not been specified | Execute a rule if a view parameter on a subform is blank, such as if Manager is not specified, then disable the Manager Comments control. |
Parameter Conditions | a View parameter on a subform has a specific value | Execute a rule if a view parameter on a subform has a specific value, such as if Number is 1000, then change the visibility of a control. |
Parameter Conditions | a View parameter on a subform does not have a specific value | Execute a rule if a view parameter on a subform is not a specific value, such as if Number is not 1000, then change the visibility of a control. |
Logical Conditions | Else | The Else condition defines the action to execute if another condition is false. |
You can find the server rule actions in the Server Interaction group of the Rule Designer.
Type | Rule Definition | Example |
---|---|---|
View | Set a control's properties | When the server loads a view, enable a Button control at runtime. See How To: Use the Set a Control's Properties Action for an example. |
View/Form | Set a subview control's properties | When the server loads a subview, enable a Button control on a subview at runtime. See How To: Use the Set a Control's Properties Action for an example. |
View/Form | Set a View on a subform control's properties | When the server loads a subform, enable a Button control on a view on the subform at runtime. See How To: Use the Set a Control's Properties Action for an example. |
View/Form | Set a subform control's properties | When the server loads a subform, enable a Button control on a subform at runtime. See How To: Use the Set a Control's Properties Action for an example. |
View/Form | Set a subform's properties | When the server loads a subform, change the Page Color of the subform at runtime. See How To: Use the Set a Form's Properties Action for an example. |
View/Form | Set a View on a subform's properties | When the server loads a subform, enable a view on a subform at runtime. See How To: Use the Set a View's Properties Action for an example. |
Form | Set a Form control's properties | When the server loads a form, enable a Button control on the form at runtime. See How To: Use the Set a Control's Properties Action for an example. |
Form | Set a View control’s properties | When the server loads a view, enable a Button control on a view at runtime. See How To: Use the Set a Control's Properties Action for an example. |
Form | Execute a server rule | When the server loads a Client form, then execute the When the server loads Region Item View server rule. |
Form | Set a View's properties | When the server loads a form, expand a view on the form at runtime, see How To Set a View's Properties for an example. |
Form | Set the Form's properties | When the server loads a form, change the Form Color at runtime, see How To: Use the Set a Form's Properties Action for an example. |
- If you create a server rule on a view and you put that view on a form, you have to create a form server load rule to execute the view server load rule on the form. You can do this conditionally and/or specify the order. The example below shows the When the server loads Client Item View and When the server loads Client List View rules executing one after another when the server loads the form.
Create a form server load rule to execute a view server load rule on a form. - When you use server load rules, you must set up the event, condition and actions on the same view or form level.
- See Rule Configuration for information on how to use items from the Context Browser to configure a rule.