NOTICE: You are in the old ClientSpace Help system. Please link to the new ClientSpace Help here https://extranet.clientspace.net/helpdoc/home/ClientSpace.htm
Business Rule Methods
This article provides a list of methods, a description of the method, and the accompanying parameters.
Clear Field Rules
You can automatically clear a field based on a specific trigger condition.
Method | Description | Parameters |
---|---|---|
_ClearFieldValue | Clears the value in a specific field on save. |
|
_ClearTabFieldValue | Clears a field on the sTabTableName dataform on save. |
|
Create Field Rules
Method | Description | Parameters |
---|---|---|
_CreateCalendarEvent |
| |
_CreateExportTransaction |
| |
_CreateExportTransactionAndData |
| |
_CreateExportTransactionAndDataByUser |
|
Required Field Rules
The Required Field business rules enable a dataform field to be completed under certain circumstances.
Method | Description | Parameters |
---|---|---|
_RequireFieldOnThisForm | Checks for a value in a field on the current form. |
|
_RequireTabField | Checks for a value in a field on a related tab. |
|
_RequireAdHocField | Checks for a value in a field that resides in a node that is embedded in the dataform XML packet. For example, there could be an Org node (like on the PEO Client Master), and you want to require the Source field. In that case, the parameters would be:
|
|
Core rules
In addition to the standard required field rules, two CORE rules allow for multiple trigger conditions when requiring fields. Both rules add an additional Trigger field and Trigger value in the parameter area of HE/SE_RequiredFieldEngine rule. Essentially this allows you to have multiple triggers for a required field rule.
Method | Description | Parameters |
---|---|---|
_SE_RequireFieldOnFormOnTrigger _HE_RequireFieldOnFormOnTrigger | Soft Error Hard Error |
|
Set Field Rules
Sometimes you want to automatically set a field value based on a set of triggering parameters; for this reason, the _SetField rules were created.
The _SetField rules provide several non-specific trigger values:
- #IsEmpty - fires the rule if the trigger field on the trigger form has no value
- #IsNotEmpty - fires the rule if the trigger field on the trigger form has some value - anything but empty
- #IsDirty - fires the rule if the trigger field on the trigger form has any value other than empty and has been changed prior to save
- #IsDirtyAndIsEmpty - fires the rule if the trigger field on the trigger form has had its value cleared prior to save
- #IsDirtyAndNotEmpty - fires the rule if the trigger field on the trigger form has some value - anything but empty and has been changed prior to save
These options and descriptions have been added to the Context help (click the field label). The TriggerValues of this help are clickable links that fill the trigger field automatically.
Method | Description | Parameters |
---|---|---|
_SetDateFieldValue | Sets a Date field on the TableName dataform. |
|
_SetDateFieldValueFromSourceField |
| |
_SetFieldFromKey | The Field Name of the field (on the Dataform Name dataform) into which the Record ID is inserted if the field is empty. Sets a Text or Integer field to that forms ID. If the field is already filled out, it does not replace the value. |
|
_SetFieldFromForm*** | Sets a field on the TableName dataform from a field on another dataform. Sets a field on the current single dataform from a field on a different single dataform. Must be in the same workspace. The data types must match. For configuration purposes, TableName is the current (target) dataform. This is to be configured for single dataforms only. Leaving the TriggerField and TriggerValue blank when configuring this rule sets the value on save of trigger dataform. If improperly configured using multi-forms, the data is set from the most recently created form, even if it is inactivated. ***Can only be used on gen_ dataforms that are not Multiforms. |
|
_SetFieldOnFormFromForm*** | Sets a field on another dataform ( gen_DataformName) from a field on the current dataform (#ThisForm) or from another dataform (gen_DataFormName). Sets a field on a single dataform from a different single dataform in the same workspace. This is triggered by a third, completely different single dataform in the same workspace. The source and target data types must be the same. This is to be configured for single dataforms only. Leaving the TriggerField and TriggerValue blank when configuring this rule sets the value on save of trigger dataform. If improperly configured, when the source dataform is a multi-form, the data is set from the most recent source multiform, even if it is inactive. If the target dataform is a multiform, the data is set on the most recent multiform, even if it is inactive. ***Can only be used on gen_ dataforms that are not Multiforms. |
|
_SetFieldValue | Sets a field on the TableName dataform on save |
|
_SetFieldValueFromPattern | This rule has the ability to extract the first instance of a value from within a text field using a valid .Net RegEx pattern and set the value of another text field on the same page to this extracted value. Some .Net regex patterns found online begin with the ^ character, which must be removed when configuring this rule. This business rule operates based on the following:
|
|
_SetImportID | ||
_SetTabDateFieldValue | Sets a Date field on the sTabTableName dataform (Tab dataform associated with the triggering dataform) |
|
_SetTabFieldValue | Sets a field on the sTabTableName dataform on save. |
|
_SetTabUserField | Sets a user field on the dataform tab that is a from a user field on the parent dataform of the tab. This only works from the Parent form to the Child form. |
|
_SetUserField | Sets a user field on the same dataform. |
|
Primary and Secondary Trigger Fields
When configuring business rules, the Primary Trigger Field and Secondary Trigger Field lists include fields that are User datatypes.
Trigger value fields are text fields that support the following configurations:
- A single User ID
- #IsDirty
- #IsEmpty
- #IsDirtyAndEmpty
- #IsDirtyAndNotEmpty
Primary Trigger
- Primary Trigger Field: can specify HdrAction or a field on the current dataform
- Primary Trigger Value: the HdrAction value or the field value used for comparison
- Compares Primary Trigger Field HdrAction value or the dataform field value with Primary Trigger Value entered
- The Primary Trigger Value must have changed for the rule to fire, based on the following criteria:
- If comparing HdrAction value, the HdrAction is assumed changed
- If comparing dataform field values (e.g., luState=MA), the dataform field must have changed
- If #IsEmpty, #IsNotEmpty, dataform field is assumed changed
- If #IsDirty, #IsDirtyAndIsEmpty, #IsDirtyAndNotEmpty, dataform field must have changed
- Clicking the label brings up a list of # conditions, which are hyperlinked to set the condition in Primary Trigger Value
Secondary Trigger
Secondary trigger field and value fields are enabled when a primary trigger condition has been set and are optional.
Criteria for secondary trigger conditions are as follows:
- Primary Trigger condition must be met. Secondary Trigger acts as an AND with Primary Trigger.
- Secondary Trigger Field: can specify HdrAction, a field on the current dataform, or a field from ServerDataProc1 or ServerDataProc2
- Secondary Trigger Field: when using Server Data Procs, the format is SDP1.FieldName or SDP2.FieldName
- Secondary Trigger Value: the HdrAction value or the dataform/SPD1/SPD2 field value
- Compares Secondary Trigger Field HdrAction value or the dataform/ServerDataformProc field value with Secondary Trigger Value entered
- The Primary Trigger Value must have changed for the rule to fire, based on the following criteria:
- If comparing HdrAction value, the HdrAction is assumed changed
- If comparing SDP1/SDP2 value, the current value is assumed changed
- If comparing dataform field values (e.g., luState=MA), the current dataform field must have changed
- If #IsEmpty, #IsNotEmpty, current dataform/SPD1/SPD2 field is assumed changed
- If #IsDirty, #IsDirtyAndIsEmpty, #IsDirtyAndNotEmpty, dataform field must have changed
- If #IsDirty, #IsDirtyAndIsEmpty, #IsDirtyAndNotEmpty, previous value is assumed Empty, field must have changed (contains a value)
- Clicking the label brings up a list of # conditions, which are hyperlinked to set the condition in Secondary Trigger Value
NOTICE: You are in the old ClientSpace Help system. Please link to the new ClientSpace Help here https://extranet.clientspace.net/helpdoc/home/ClientSpace.htm