Author: Ian Britz
You can configure one or more SQL Rules to run independently in a Dashboard by using the Dashboard Rule Component. In the image below, we've configured a SQL Rule to automatically add a new Employee to the Form by pressing a button in the Dashboard.
In order to configure the example above, first let's navigate to our Dashboard editor, and right-click and select Add Rule. This will add a Rule Component to the Dashboard. Then click on the settings icon to configure the Rule.
Each Dashboard Rule component can be associated with its own action button, SQL rule, and execution behavior. The configurable behaviors include:
- Rule: Select from all the SQL Rules within the application.
- Form: If the SQL Rule is associated with user input on a Form, you can select a Form from the current Dashboard page. It's not required to tie a Dashboard rule to a Form, however. You can leave it blank if not needed.
- Auto Run: This will cause the Rule to run automatically when users Post the plan.
- Auto Close: This will cause the execution window to close on Rule completion.
- Auto Exit: This will cause the submission to automatically Exit on Rule completion.
- Clear Form: This will cause the associated Form to clear all changes on Rule completion.
- Preserve Parameter: This will preserve Rule parameters between each run of the Dashboard Rule component.
In the FORMAT tab you have all the typical formatting options available to style the Rule component however you'd like. Let's move on to the WORKFLOW tab. Here you can control the users that can access your Rule component by the Workflow Actions they have available.
For example, if you have a Rule to be run when a submission is approved, naturally, it should be accessible to only users that have the ability to Approve submissions.
In the LAYOUT tab you can add an additional level of customization by changing the text that displays on the Rule Tab and Run Button.
In the image below, you can see an example of what the changes made will be presented as. This could be helpful in describing the actions of the Rule to the user. For example, if a Rule is set to Auto Exit, it may be helpful to rename the Run button to Run & Exit.
Once all the configuration is complete, add some formatting and switch to the PREVIEW tab to test out your Rule.