Configuring Rules and Business Logic
Dataform rules can trigger events, ensure that data does not become corrupt (no duplicate SSN and FEIN), and manage the requirements of a workflow, along with any number of custom functions.
You can configure rules to auto-populate another field when a value is selected. For example, let’s say that you select a Primary trigger field and a Secondary trigger field. If the values match, you can set a destination value. You have choices for operator and trigger value datatypes. For example, you can create a rule when you want to set the Implementation Specialist to X when the Payroll Specialist is Y.
To configure a rule:
- Go to System Admin > Advanced > Manage Rules.
The Custom Logic Rules dashboard opens. - To add a business rule, click Add.
The Rule Details form opens.
- Complete the form using the following guidelines.
Table Name | This is the dataform where this rule will execute when the dataform is saved. |
Method | Select a method. Is this rule for a field, calendar event, a date value, etc? Our example shows _SetFieldValue. Also see Business Rule Methods. |
Rule Title | Provide an abbreviated explanation of what this rule does, for example, "Set Implementation Specialist for Green Team". |
Rule Type | ClientSpace controls this field automatically. Rule Type is determined by the Method. |
Description | Provide a more thorough explanation of what this rule is to accomplish. |
Primary Source |
Select the dataform or tabbed child form to use as the source for the primary trigger evaluation. Note: To save a Primary Source field value, you must select a corresponding trigger field, operator, and value. If you do not, the source value clears upon saving. |
Secondary Source |
Select the dataform, tabbed child form, Server Data Proc 1 (SDP1) or Server Data Proc 2 (SDP2) to use as the source for the secondary trigger evaluation, if applicable. Note: To save a Secondary Source field value, you must select a corresponding trigger field, operator, and value. If you do not, the source value clears upon saving. |
Primary Trigger Field |
Select or type the name of the field that is going to cause the change. This field is a lookup of all the fields on the specified Primary Source form. |
Secondary Trigger Field |
Select or type the field name of an additional trigger condition that must be met if necessary. This field is a lookup of all the fields on the specified Secondary Source form. The lookup may include Server Data Proc 1 (SDP1) and Server Data Proc 2 (SDP2) fields. The fields appear at the bottom of the Secondary Trigger Field drop down list prefaced with SDP1 or SDP2. Note: Not all organizations will have SDP2 fields displayed in the list. The Server Data Procs are stored procedures that allow you to access and add fields on one dataform that reside on a different dataform. SDP1 is typically set up in the implementation phase for all customers to provide access to some fields that we feel may be helpful to most organizations. SDP2 fields are only present if custom development was requested from Professional Services that required additional access to fields. |
Primary Trigger Operator Secondary Trigger Operator |
Select the operator datatype. The following operators apply to their respective datatypes:
Note:
|
Primary Trigger Value Secondary Trigger Value |
Type or select a value to be met as a triggering condition. Note: Primary and Secondary trigger values are selectable from a drop down list when the associated Primary or Secondary trigger field is a HdrAction or a Lookup. The following list is the standard behavior of the value field based on datatype:
Other valid values include:
Note:
|
Execution Pipeline |
Leave this set to Default. Note: If you are using the Pipeline Linking table to manage Pipeline Behaviors and you are configuring a new rule, pipelines assigned a behavior of Default will auto-fill the Execution Pipeline field. If you are editing an existing rule, Execution Pipeline entries remain intact until edited. Changed entries are validated against the Pipeline Linking table. For instance, if a pipeline has been assigned a behavior of Allow or Default and you remove it, you will still be able to select it from the Execution Pipeline list. If the same pipeline is assigned a behavior of Disallow, you will not be able to add it again. |
Execution Order |
This field controls the order in which rules will execute. Rules execute from the lowest to the highest number. It may be necessary to look at other rules already configured on this dataform to determine the order of precedence for executing rules. Execution Order of Precedence: Within the Rules system, there is a distinct order of precedence that occurs, that being HardError, SoftError, BizLogic. This means that setting a field to a specific value automatically with BizLogic, then validating that field with a Hard Error will never occur in the correct order, as the Hard Error will fire before the BizLogic fills the field. This order of precedence happens irrespective of the execution order placed on the configured rule, so Hard Errors will fire in Execution Order least to greatest, then Soft Errors will fire in their order of execution, then the Biz Logic will happen, again in the order of execution set on each rule. |
Save Action | Will this rule be applied on Insert of a new dataform, the Update of an existing dataform, or on Both? |
Workspace Templates |
Select the templates under which this rule will run. |
System |
If selected, the system restricts access to only developer users for some of the rule fields. |
Tags |
This field indicates a tag that associates the rule with a ClientSpace feature (for example, SIDES, Pricing, or Gradient). Note: Global admin users can not edit the value in the Tags field if the System check box is selected. |
Method Parameters |
Method Parameters are dependent on the selected rule method for this rule. Hover over the info bubble for more parameter information or submit an Extranet case with your questions.
Note: When setting TargetField and SourceField parameters, the datatypes must either match exactly (EX: Text to Text) or be otherwise compatible (EX: Decimal to Currency). Validation occurs at Save to check for an exact or compatible datatype match. If a match is not found, a soft error message displays: "The TargetField '<TargetField Value>' on Dataform '<Dataform Name>' may not be compatible with the SourceField '<SourceField Value>'. Do you wish to continue?"
The soft error allows you to continue with the Save but if you do not correct the issue, errors may occur when the rule is triggered. |
- Click Save, Apply, or Save & New.
Save & New clones the selected dataform from the previous rule, making it easier to add multiple rules to the same dataform.
To find the technical database names and the values stored in the database representing the value on the dataform, use a combination of Ad-hoc Reports, the Dataform Specifications Report, Lookup Admin, or Dataform Admin.
If you need further help with configuring custom rules in your system, please log a case in the Extranet.