Business Rule Methods

This topic provides a list of methods, a description of the method, and the accompanying parameters.

Dataform rules include Biz Logic, Hard Errors, and Soft Errors. These rules can trigger events, ensure that data does not become corrupt (for example, no duplicate SSN and FEIN), and manage the requirements of a workflow, along with any number of custom functions.

Business Logic Rules compare fields, perform calculations, change values of fields, validate values, and more.
Hard Errors (HE) are hard and fast requirements that must be met before the action can be completed. These are most commonly used to require that data be entered before a certain step in the process but without making it a hard requirement to save the current dataform.
Soft Errors (SE) are used as reminders and warnings. These can be configured as custom and complex warnings, or they can be simple warnings to remind someone to complete a specific field.

For details about adding a business rule, see Configuring Rules and Business Logic.

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.
sFieldName (field to be set)
sFieldValue (value to be entered in the field)
_ClearTabFieldValue Clears a field on the sTabTableName dataform on save.
sTabTableName (Dataform Table of Tabbed Dataform)
sFieldName (field to be set

Create Field rules

Method Description Parameters
_CreateCalendarEvent  
FieldName
Subject
Invitees
StartTime
EndTime
MeetingType
_CreateExportTransaction  
ExportConfigGUID
_CreateExportTransactionAndData  
ExportConfigGUID
_CreateExportTransactionAndDataByUser  
ExportUser
ExportConfigProc

Required Field rules

The Required Field business rules enable a dataform field to be completed under certain circumstances.

Method Description Parameters

_RequireFieldOnForm

Allows you to make a core form field required for data entry. Trigger fields are optional. You can simply make the field required by identifying the field name in sFieldName or you can use the trigger fields in conjunction with sFieldName to make the field required when triggered.

Note:

  • Since this is a core form and not a dataform, you will need to open the core form to get the field name instead of going to Dataform Admin.

  • sFieldName is case-sensitive. Type the field name exactly as shown on the form.

  • As there is some setup required to utilize this method, please contact ClientSpace Professional Services for first-time setup assistance.

sFieldName

_RequireFieldOnThisForm Checks for a value in a field on the current form.
sFieldName
_RequireTabField Checks for a value in a field on a related tab.
sTabTableName
sFieldName
_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 (on the PEO Client Master), and you want to require the Source field. In that case, the parameters would be:

sFieldPath:  Org/crSource   
sFieldLabel: Source
sFieldPath
sFieldLabel 

Prevent duplicate records

By default, these rules validate other active dataforms of the same type within the same workspace. You can configure the rules with an All Workspaces flag, which allows the rule to validate across all workspaces with the dataform. Similarly, an Include Inactive flag allows the rule to include inactive records both within a workspace and across workspaces.

Method

Description

Parameters

_HE_PreventDuplicateRecords

Hard Error that validates a unique dataform record based on a configured Field Name parameter (such as ImportID). Default behavior validates active dataforms within the same workspace. The default error message for this rule states, "This form cannot be saved because the value for '<fieldName>' is not unique."

  • FieldName (text): The field which the rule will validate for duplicate records.
  • AllWorkspaces (checkbox): When selected, the rule validates the current record against all dataforms of its type across all workspaces, overriding the default same workspace behavior.
  • IncludeInactiveRecords (checkbox): When selected, the rule validation includes Inactive records, overriding the default active only behavior.

_SE_PreventDuplicateRecords

Soft Error that validates a unique dataform record based on a configured Field Name parameter (such as ImportID). Default behavior validates active dataforms within the same workspace. The default error message for this rule states, "The value for <fieldName> is not unique to the system, are you sure you want to proceed?"

  • FieldName (text): The field which the rule will validate for duplicate records.
  • AllWorskspaces (checkbox): When selected, the rule validates the current record against all dataforms of its type across all workspaces, overriding the default same workspace behavior.
  • IncludeInactiveRecords (checkbox): When selected, the rule validation includes Inactive records, overriding the default active only behavior.

Core rules

In addition to the standard required field rules, CORE rules allow for multiple trigger conditions when requiring fields. Core 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

_AddRowSecurity

Add Row Security

When triggered, adds row level (i.e., record level) security to the affected record for the current user that triggered the rule, any Global Administrator and an optional user, such as the "Assigned To" user, specified in the SecuredUser method parameter.

 

Note:

  • SecuredUser can be blank if no additional user is being specified.

  • If SecuredUser is specified, field validation ensures a correct user field name is entered.

  • Row level security overrides form level security.

  • Row level security respects field level security and tab level security.

  • When row level security is applied, a Remove Row Level Security icon displays in the Action Center of the open record for Global Admins and users with Admin rights to the current Table Name.

_AddUserToWorkspace

Add User

When triggered, adds a user from a specified form and field to the workspace user list. The source form can be any single dataform in a workspace. The source field can be any user field on the trigger form.

SourceForm: #ThisForm

SourceField: FkUserID

_CalculateTimeDifference

Calculate Value and Set Value

When triggered, calculates the time difference between two DateTime datatype fields in Seconds (S), Minutes (MM), Hours (H), Days (D), Weeks (W), or Months (M) between and writes the value as a whole number to a specified TargetField.

Set the following method parameters as applicable:

  • SourceForm1: Specify the form where the first field in the difference equation is found. Only allows #ThisForm or Single dataforms.

  • SourceField1: Specify the first field in the difference equation. Only DateTime datatype fields are valid.

  • SourceForm2: Specify the form where the second field in the equation is found. Only allows #ThisForm or Single dataforms.

  • SourceField2: Specify the second field in the difference equation. Only DateTime datatype fields are valid.

  • TargetForm: Specify the form where the results of the equation will be set. Only allows #ThisForm or Single dataforms.

  • TargetField: Specify the field where the results of the equation will be set. Only allows Text, Integer, or Decimal datatypes.

  • TimeUnit: Specify the unit of measurement for the time difference calculation results: S = Seconds, MM = Minutes, H = Hours, D = Days, W = Weeks, and M = Months.

     

    Note: When selecting a time unit, keep in mind that ClientSpace writes the calculated time difference as a whole number. For example, if you select a time unit of Months (M) and there is a time difference of two weeks between the two DateTime datatype fields you identified, the TargetField will show 0 as no partial months are being written to the TargetField.

  • UseBusinessHours: Select this option to base time difference calculations on business hours and work week settings specified in your ClientSpace install settings. The fields used to determine business hours are Business Open, Business Close, Business Week Begin Day and Business Week End Day. If you require help with these settings, please log a case with your Professional Services representative.

  • When calculating across holidays, ClientSpace is using the holidays entered in the Company Holiday table ( (System Admin > Advanced > Company Holiday) to determine the holiday hours that should be excluded from time difference calculations.

HE_ExistingWorkspace

Hard Error

When triggered, if there is a workspace associated with the triggering organization, the following hard error displays: "This organization already has a Workspace associated with <WorkspaceName>. Please contact your system admin if you believe this is in error."

 

Note: Site must be configured to use rules on the organization. Please contact ClientSpace Professional Services if you want to activate this rule.

_SE_RequireFieldOnFormOnTrigger

_HE_RequireFieldOnFormOnTrigger

Soft Error

Hard Error

TriggerTable: must be gen_x or #ThisForm
#ThisForm uses live data from the current form PRIOR to the save. 
gen_x evaluates the TriggerField value in the database to determine if TriggerField = TriggerValue
TriggerField: must be a valid field on Trigger Table.
TriggerValue: must be a value or #IsEmpty.
RequiredTable: must be gen_x or #ThisForm
#ThisForm uses live data from the current form PRIOR to the save.
gen_x evaluate the RequiredField value in the database to determine if RequiredField is populated.
RequiredField: must be a valid field on RequiredTable.

_HE_RequireFileDescription

Hard Error

Requires a document uploaded to a field that has a description before saving

_HE_RequireFileCategory

Hard Error

Requires a document uploaded to a field that has a category before saving

_HE_LimitFileUploadTypes

Hard Error

Limits the file types that can be saved into a field.

_HE_ValidateMinMax

Hard Error

Validates the minimum and maximum values for specific datatypes that support Integer, Number, Decimal, and Money. If the imported amount exceeds the minimum or maximum values, the import fails and records each failed issue. When all the values in the field meet the acceptable range, the dataform is updated.

_HE_ValidateIncidents

Hard Error

This method checks for open tasks associated with a case when a user changes the status of the case to Complete and the user attempts to save the case.

If the case includes any incomplete tasks that are not marked Private, the system displays the following message:

The following error(s) were found in your submission:

  • There are associated tasks that are not complete. You must complete these tasks before resolving the case.

If the case includes any incomplete tasks that are marked Private, the system displays the following message:

The following error(s) were found in your submission:

  • There are associated tasks that are not complete that may be Private. The users assigned to these tasks must complete them before resolving the case.

If the case includes any incomplete tasks that are marked Private AND the user is a Global Administrator, the system appends the following additional information to the end of message above: 

If private, please contact the following users

- (<FirstName> <LastName>)

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 Triggering Form has no value
#IsNotEmpty: fires the rule if the trigger field on the Triggering Form has some value - anything but empty
#IsDirty: fires the rule if the trigger field on the Triggering Form has any value other than empty and has been changed prior to save

These options and descriptions are in the contextual help (click the field label). The Trigger Values of this help are selectable links that fill the trigger field automatically.

Method Description Parameters
_SetDateFieldValue Sets a Date field on the TableName dataform.
sFieldName: Field to be set.
sFieldValue: Value to be entered in the field accepts datetime shortcuts (t,d,w,m,y, mm, h), such as, t (current time),1w (+1 week), 1h (+ 1 hour), 30mm (+ 30 minutes), -1d (- 1 day), etc.
_SetDateFieldValueFromSourceField Sets the Date field from a field on another dataform.
TargetField: Field on form to be set.
SourceField: Field on SourceForm to be inserted.
SourceForm: Dataform providing inserted value.
OffsetInterval

_SetDateTimeFieldValue

Sets a Date Time field on the TableName dataform.

sFieldName: Field to be set.
sFieldValue: Value to be entered in the field accepts datetime shortcuts (t,d,w,m,y, mm, h), such as, t (current time),1w (+1 week), 1h (+ 1 hour), 30mm (+ 30 minutes), -1d (- 1 day), etc. and specified date times, if desired. (Must be in Military or Zulu time.)

_SetDateTimeFieldValueFromSourceField

Sets the Date Time field from a field on another dataform.

TargetField: Field on form to be set.
SourceField: Field on SourceForm to be retrieved and inserted into the TargetField.
SourceForm: Dataform providing inserted value.
OffsetInterval: May be used standalone or combined with datetime shortcuts (t,d,w,m,y, mm, h). If no offset is necessary, field can be left blank.
_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 form's ID. If the field is already filled out, it does not replace the value. 
TargetField: The TargetField must be either a Text or Integer Input datatype. Can be used on new or existing records.

_SetFieldFromLookupMetadata

Sets a dataform field value on the triggering dataform from a field value on an associated metadata dataform when a lookup is selected that contains metadata. The source and target data types must be the compatible. Metadata field to Target field validation prevents you from specifying mismatched data types.

Note: If there is no metadata available when the rule is triggered, the rule is skipped.

SourceLookup: Lookup field on the source form.
MetadataField: Metadata field associated with SourceLookup.
TargetField: Lookup field to be set.
_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.

TargetField: Field on form to be set.
SourceField: Field on SourceForm to be inserted.
SourceForm: Dataform providing inserted value.
AllowEmptyValue:  Clears the target field if SourceField is empty. When unchecked, the target field remains unchanged.
_SetFieldFromRelatedForm

Sets a field on the child dataform from a field on a dataform that is defined as the related parent dataform regardless of workspace.

Sets a field on the current:

  • Single dataform from a field on a different single dataform

    Or

  • Single dataform from a field on a different multiform

    Or

  • Multiform from a field on a different multiform

Note: 

  • Both fields can be in the same workspace OR in different workspaces. If the fields are in different workspaces, a parent form field must connect the two forms.

  • Data types must match. 

  • If the child field referenced by the rule is empty, the system will take no action.

TargetField: The Field Name of the field (on the 'Dataform Name' dataform) into which the system will insert the SourceField value.
SourceField: The field on the SourceForm from which the system will retrieve data and insert it into the TargetField.
SourceForm: The Dataform from which the data will be retrieved. Tip: '#ThisForm' can be used to indicate the same form on which this rule is configured
AllowEmptyValue: If checked, allows the TargetField to be cleared if the Sourcefield value is empty. If unchecked and the Sourcefield value is empty, the system will not update the value in the TargetField.
RelatedParentField:  The field on the Table Name that is the relationship to the SourceForm from which data will be retrieved and inserted into the TargetField.

_SetFieldOnFormFromFormTabs

Takes a value from a field on a dataform or tab dataform and sets it on another dataform or tab dataform. The new method supports the following configurations:

  • Singleform to singleform

  • Multiform to singleform

  • Multiform to multiform if both dataforms are within the same tab set

  • Tab field to Tab field if both fields are within the same tab set

Note: 

  • _SetFieldFromTabOnTab is only configurable on the primary form of a tab set but the triggering fields can come from tabbed forms.

  • Target Field and SourceField datatypes must be compatible. See Field Datatype Validation - Compatible Datatypes

 

 

  • TargetForm: The dataform containing the TargetField. The dataform to which data will be copied. This can be the Primary form, a singleform or any tab form within the tab set. '#ThisForm' can be used to indicate the same form on which this rule is configured.

  • TargetField: The field where the data will be inserted.

  • SourceForm: The dataform containing the SourceField. The dataform from which data will be copied.

  • SourceField: The field on the SourceForm from which the system will retrieve the data being inserted into the TargetField.

_SetFieldOnRelatedForm

Sets a field on the parent dataform from a field on a dataform that is defined as the related child dataform.

Sets a field on the current:

  • Single dataform from a field on a different single dataform

    Or

  • Single dataform from a field on a multiform

    Or

  • Multiform from a field on a different multiform

Note: 

  • Both fields must be in the same workspace and the data types must match. 

  • If the child field referenced by the rule is empty, the system will take no action.

 

TargetField:  The Field Name of the field (on the 'Dataform Name' dataform) into which the system will insert the SourceField value
SourceField: The field on the SourceForm from which the system will retrieve data and insert it into the TargetField.
SourceForm: The Dataform from which the data will be retrieved. Tip: '#ThisForm' can be used to indicate the same form on which this rule is configured
AllowEmptyValue: If checked, allows the TargetField to be cleared if the Sourcefield value is empty. If unchecked and the Sourcefield value is empty, the system will not update the value in the TargetField.
RelatedParentField: The field on the Table Name that is the relationship to the SourceForm from which data will be retrieved and inserted into the TargetField
_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. 

When a rule uses this method and the system executes that rule, the system can copy up to 500 characters from the source field on the source dataform to the target field on the target dataform.

***Can only be used on gen_ dataforms that are not Multiforms.

TargetField: Field on the form to be set.
SourceField: Field on SourceForm to be inserted.
TargetForm: The dataform to which the data will be copied.
SourceForm: Dataform providing inserted value.
_SetFieldValue Sets a field on the TableName dataform on save
sFieldName: Field to be set.
sFieldValue: Value to be entered in the field.
_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:

The SourceField value is always be treated as textTargetField must be a Text data typeTargetField is ALWAYS overwritten with the results of the pattern matchSourceField and TargetField must be on the current dataform and cannot be used on tabbed forms. If the pattern match returns no value, the TargetField is cleared.
TargetField: Text datatype
SourceField: text
Pattern

SetImportID

Sets the ImportID on the State Master form equal to the State field on the same form. The ImportID will be refreshed if the State is updated.
sFieldName: Field to be set.
sFieldValue: Value to be entered in the field.
_SetTabDateFieldValue Sets a Date field on the sTabTableName dataform (i.e., Tab dataform associated with the triggering dataform)
sTabTableName : Dataform Table of Tabbed Dataform.
sFieldName: Field to be set.
sFieldValue: Value to be entered in the field accepts datetime shortcuts (t,d,w,m,y, mm, h), such as, t (current time),1w (+1 week), 1h (+ 1 hour), 30mm (+ 30 minutes), -1d (- 1 day), etc. and specified date times if desired. (Must be in Military or Zulu time.)

_SetTabDateTimeFieldValue

Sets a DateTime field on the TabTableName dataform (i.e., Tab dataform associated with the triggering dataform).

sTabTableName : Dataform Table of Tabbed Dataform.
sFieldName: Field to be set.
sFieldValue: Value to be entered in the field accepts datetime shortcuts (t,d,w,m,y, mm, h), such as, t (current time),1w (+1 week), 1h (+ 1 hour), 30mm (+ 30 minutes), -1d (- 1 day), etc.
_SetTabFieldValue Sets a field on the sTabTableName dataform on save.
sTabTableName: Dataform Table of Tabbed Dataform.
sFieldName: Field to be set.
sFieldValue: Value to be entered in the field.
_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.
TabTableName: Dataform Table of Tabbed Dataform.
TargetField: Field to be set.
SourceField
Use #CurrentUser to set the target user field to the current logged in user. 
Use #LoginID (with LoginID replaced by a specific user login ID) to automatically set the target user field to a specific user.)
_SetUserField Sets a user field on the same dataform.  
TargetField: If a non-user field is selected as the TargetField, such as a text field, the importID will be set in the TargetField. 
SourceField
Use #CurrentUser to set the target user field to the current logged in user.
Use #LoginID (with LoginID replaced by a specific user login ID) to automatically set the target user field to a specific user. Leaving the TriggerField and TriggerValue blank when configuring this rule sets the value on save of trigger dataform.
SetPayrollFrequency

Sets the Payroll Frequency field on a Pay Group. The SetPayrollFrequency method uses the difference between the Period Start and Period End date fields on the Pay Group to determine the pay frequency. The following list illustrates how the system determines the pay frequency:

  • If the difference between the start and end dates equals seven, the system sets the pay frequency to Weekly.

  • If the difference between the start and end dates equals 14, the system sets the pay frequency to Bi-Weekly.

  • If the difference between the start and end dates equals 13,15, or 16, the system sets the pay frequency to Semi-Monthly.

  • If the difference between the start and end dates is greater than 27, the system sets the pay frequency to Monthly.

  • If the difference between the start and end dates is anything else, the system sets the pay frequency to Other.

 

SetStaffingEmployeeRelatedFields

Sets the Location, Comp Code, and Jurisdiction State from the selected Staffing Placement when the Staffing Placement field on the Comp Claim Claimant dataform is edited. The field state must be "IsDirty" and "NotEmpty".

 

Stage Field rules

StageField rules allow you to prepare a field value to be saved to a target form and apply the change later in the save process based on a set of triggering parameters.

The _StageField rules provide several non-specific trigger values:

Method Description Parameters
_StageChangesOnFormFromForm

Prepares a field value on the source dataform ( gen_DataformName or #ThisForm) to be saved to a specified field of the same datatype on the target dataform (gen_DataFormName). The rule stages the field on a single dataform from a different single dataform in the same workspace. The rule is triggered by a third, completely different single dataform in the same workspace.

 

Note: 

  • The rule can be used on single dataforms only, not multiforms.

  • The source and target datatypes must be the same.

  • The system can copy up to 500 characters from the source field on the source dataform to the target field on the target dataform.

  • If the rule is triggered and not followed up at any point by a _SaveStagedChanges rule, the triggered change will not occur on the target form.

TargetField: The field name of the field on the target dataform into which the system will insert the SourceField value.
TargetForm: The dataform to which the data will be copied.
SourceField: The name of the field on the source dataform from which the system will retrieve data and insert it into the TargetField.
SourceForm: The dataform from which the data will be retrieved. #ThisForm' can be used to indicate the same form on which this rule is configured.
_SaveStagedChanges

Works in conjunction with _StageChangesOnFormFromForm. Saves any staged changes from a source form to an associated target form while following the specified pipelines that have been triggered prior to the triggering of this method.

Note: 

  • The rule will validate the existence of the TargetForm and that it is not a multiform.

  • Hard and soft errors will be ignored when saving the target form.

  • The rule can trigger business logic, email templates and workflow channels.

TargetForm: The dataform to which the data will be copied.

Pipeline: The pipeline the rule should follow once triggered. (Validates against the Pipeline Code from the Pipeline Linking table.)

Generating Merge Files

To assist in generating the merge files to prepare to send to DocuSign, the _GenerateMergeFile business rule can be configured to run the merge document and deposit the file in a field. This business rule can be configured multiple times to generate each file needed. After the business rules are run, you can review the documents in their individual file fields before you click the workflow link to send the files to DocuSign for signatures.

Method

Description

Parameters

_GenerateMergeFile

When you create the rule, use the method _GenerateMergeFile.

  • MergeGUID: The 8 or 36 character Merge GUID (from the Merge form).

  • TargetForm: Enter the table name for a single form dataform in the current workspace on which the system will store the merge output.

    Tip: You can enter "#ThisForm" to indicate the same form on which this rule is configured (this can be a multi-form).

  • TargetField: Enter a field name for a field on the TargetForm to indicate the field to which the system will store the merge output.

    Tip: You can enter "#Attachment", to attach the merge output to the TargetForm (this will not version the attachment).

  • FilePrefix: Enter a value to add as a prefix to the merge output (for example, the system uses the format 'FilePrefix-YYYYMMDDHHMMSS.ext').

    Note:  Enter only valid file name characters or an error may occur

  • SaveRecord: If the checkbox is checked then the triggering dataform record will be saved before generating the merge.

Change Workspace Template

You can create a rule that will allow you to change the workspace template. When triggered, the current workspace will be set to the template specified on the rule.

Method

Description

Parameters

SetWorkspaceTemplate When you create the rule, use the method SetWorkspaceTemplate. Changing the workspace template will rebuild the workspace, inheriting the user and dataform values configured on the new template.
  • TemplateCode: The workspace template code of the template workspace that the rule will use for the current workspace.

Complete All Non-Archived Tasks

You can create a rule that will close all associated tasks on a dataform regardless of the origin of the task so that you do not have to close tasks manually.

Method

Description

_TaskAutoCompleteAll When you create the rule, use the method _TaskAutoCompleteAll. This method completes all non-archived tasks that are associated with a dataform except for tasks that define a recurring rule.

Create Task

You can create a rule that will import historical incident data from another application into aClientSpace task within the correct Workspace.

Method

Description

CreateTask When you create the rule, use the method _CreateTask.

The CreateTask method uses the Import_Incidents dataform to temporarily store incident information until the task information is extracted from it. The Import_Incident dataform is used in other import processes but contains the following fields specific to the CreateTask method:

  • Assigned To

  • Send Notification

  • More Info

  • Completed

  • Delete

  • External Object

  • Search ID

Once a rule is triggered using the CreateTask method, an Import_Incident file is uploaded through Import Management. The file is processed, and each row is read and stored in the Import_Incident dataform until the task is generated. Then, the dataform is deleted. Any errors encountered during file processing are stored in the Import Log (without any disruption to Import_Incident file processing). Finally, the imported task information is imported into new ClientSpace task records within the correct Workspaces.

Add Subscribers by Role

You can create a rule that will add subscribers based on their role on the client team instead of adding subscribers as specific users to each client service case.

 

Method

Description

Parameters

_AddSubscriber

When you create the rule, use the method _AddSubscriber. This method adds a subscriber to a case by using a user field from an active, single dataform (for example, the client master).

  • SourceForm: The Dataform from which the data will be retrieved. '#ThisForm' can be used to indicate the same form on which this rule is configured.

  • SourceField: The user field on the SourceForm that will be used to add a subscriber.

Mark Rehire

You can create a rule that sets the Rehire checkbox on the Employment dataform to checked when the employee’s Employment Status is updated from Terminated to Active so that you do not have to remember to click the Rehire checkbox manually.

Method Description
MarkRehire When a rule is triggered using the MarkRehiremethod, it sets the Rehire checkbox on the Employment dataform to checked when Employment Status is updated from Terminated to Active and the Last Hire Date is different from the Original Hire Date.

Inactivate Deleted Employee

You can create a rule that sets the Employment Status field in the ClientSpace Employment record to "Deleted" and then deactivates the Employment record. The rule is triggered when a deleted employee record is imported by the PrismHR User Import API.

Method

Description

InactivateDeletedEmployee

The rule is triggered when a deleted employee is imported by the initial or ongoing PrismHR User Import API. The rule sets the Employment Status field on the Employment record to "Deleted", then deactivates the Employment record and related employee record by removing the check marks from the Active checkboxes on those forms. When you create the rule, use the following settings:

  • Table Name: Employment

  • Rule Title: Inactivate Deleted Employee

  • Description: Rule triggers when an employee is deleted in the connected PrismHR install. When the import queue record is processed, the Employment Status will be set to "Deleted" and the Employment and related Employee record will be deactivated.

  • Method: InactivateDeletedEmployee

  • Primary Trigger Field: Employment Status

  • Primary Trigger Operator: Is Dirty

  • Secondary Trigger Field: Employment Status

  • Secondary Trigger Operator: Equals

  • Secondary Trigger Value: D

  • Execution Pipeline: Imports, Initial Import

  • Save Action: Both

  • System: Checked

Inactivate Child Forms

When an imported PrismHR batch is in "Deleted" status, the Inactivate Child Forms rule deactivates the Payroll Batch as well as the associated Pay Groups and Billing Vouchers. The rule is triggered when a deleted Payroll Batch is imported by the PrismHR Payroll Batch Import API.

Method

Description

InactivateChildForms

The rule is triggered when a deleted Payroll Batch is imported by the PrismHR Payroll Batch Import API. The rule sets the Batch Status field on the Payroll Batch form to "Deleted", deactivates the Payroll Batch and deactivates associated Pay Groups and Billing Vouchers by removing the check marks from the Active checkboxes on these forms.

Note: The rule needs to be configured on the same pipeline as the HRPAPI_payroll_batch*.csv import configuration so that it triggers when Payroll batches are imported.

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

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 dataform field must have changed
Click the label for a list of # conditions that 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 dataform field must have changed
If #IsDirty previous value is assumed Empty, field must have changed (contains a value)
Click the label to for a list of # conditions that are hyperlinked to set the condition in Secondary Trigger Value.