Select Data Source Queries and Rules to Run
If you want data source queries, form rules, or business rules to run when a Data Provider Person or process that enters data into a form or other data entry view for a label that was configured by a Designer. A user acting as a Data Provider requires the DOCUMENT_PRINTER role or equivalent permissions. performs a particular action using a control, you must configure a trigger
A means of running an action, rule, or data service. Includes a trigger source if interactive (such as a button, a prompt, or a form) and a trigger event (such as clicking a button, entering text at a prompt, loading a form, or submitting a job). For example, you can specify a particular button as a trigger source that Data Providers can click to perform a query of a database. for each data source or rule.
For information about how to add a control, see Adding Controls.
Control | Trigger Event | When the Trigger Event Occurs |
---|---|---|
onClick |
A Data Provider clicks a button. |
|
onChange |
A Data Provider selects or clears a check box, changing its state. |
|
onChange |
A Data Provider changes which option is selected in a drop-down list. |
|
onChange |
A Data Provider changes which printer or other device is selected and clicks OK in a Device Selector dialog box. |
|
onChange |
A Data Provider changes which folder is selected and clicks OK in a Folder Selector dialog box. |
|
onChange |
A Data Provider changes which label is selected and clicks OK in a Label Selector dialog box. |
|
onChange |
A Data Provider changes which option is selected in a radio button group. |
|
onFocusOut |
A Data Provider enters text then clicks to another field, tabs to another field, or presses the Enter key to submit the text in the Prompt field to Spectrum. |
|
onChange |
A Data Provider changes which user is selected and clicks OK in a User Selector dialog box. |
|
onFocusOut |
A Data Provider enters text then clicks to another field, tabs to another field, or presses the Enter key to submit the text in the Text Box Prompt field to Spectrum. |
Select a Data Source Query to Run
If you want a query of a Database data source A connection to a database that acts as a data source and can serve as the data ref for a document field. A Database data source is associated with a Database data service. or an Alternate data source
A connection to a file external to Spectrum that acts as a data source and can serve as the data ref for a document field. An Alternate data source is associated with either a File data service or an HTTP data service. to be run when a Data Provider uses a particular control, do the following to select a trigger.
Tip: If you have not yet created the data source for which using the control should act as a trigger, you can skip this step and select the trigger when you create the data source. For more information, see Create a Database Data Source or Create an Alternate Data Source.
-
From the Insert tab in the ribbon, click and drag Run Data Source to the form. The Run Data Source Action dialog box is displayed.
- Select a Trigger Source and Trigger Event, as described above.
- If you have configured more than one data source query to be run by this control, you can configure the running order of the data source queries by entering a value for Priority. The data source with the lower value for Priority is run first.
- If the data source should only run under a certain condition. Select Conditional, and describe the conditions.
- Enter a Name.
- Select an Operator.
- Enter a Value.
- Select the data source to use for the action from the Data Sources.
- Click OK.
Select a Rule to Run
If you want a rule to be run when a Data Provider uses a particular control, do the following to select a trigger.
-
From the Insert tab in the ribbon, click and drag Map Operations, Static, or Run Another Business Rule to the form. The action dialog box is displayed.
- Select a Trigger Source and Trigger Event, as described above.
- If you have configured more than rule to be run by this control, you can configure the running order of the rules by entering a value for Priority. The rule with the lower value for Priority is run first.
- If the rule should only run under a certain condition. Select Conditional, and describe the conditions.
- Enter a Name.
- Select an Operator.
- Enter a Value.
- Configure the remaining fields for the rule. For more information, see Map Operations Rule, Static Rule, or Run Another Business Rule.
- Click OK.