SAP Knowledge Base Article - Public

2080138 - How to Propagate fields using Business Rules

Symptom

  • How to setup a Rule that will propagate changes based on selection of data in other fields
  • Example: We would like to make the Location field propagate the Timezone when the Location field is changed in the Job Information portlet.
  • Is it possible to create a propagation rule for Employee Central using the MDF Rules Engine?

Environment

Employee Central 2.0

Resolution

  • Yes it is indeed possible to create rules that will propagate data on change or save for Employee Central, using the MDF Rules Engine.
  • Using Propigation rules, it is possible to set a field to a default value during the hire process
  • In the following example, we would like to configure a rule so that when the Location field is changed, this change then sets the Timezone field in Job Information portlet when the Location field is changed.

 

There are a few steps to follow to configure this propagation via Rules:

 

First you may need to add a RuleType to your RuleType MDF Picklist.
Follow these steps:

  1. Admin Center -> Configure Object Definitions
  2. Search -> Picklist >  find picklist named  "RuleType".
  3. Check for an existing value named "FieldDefault".  If it does not exist, lets add it..
  4. Select “Make Correction”.  Add a new value with a descriptive name “FieldDefault”.
  5. Click Save

 1.png

*Note: The RuleType value used can be anything.  This is for categorization purposes.

 

Next create the Rule:

  1. Navigate to Admin Center > Configure Business Rules and click Create New Rule.
  2. Select "Basic", Give the rule a Name "populateMyField"and select the RuleType from our steps above (FieldDefault).
  3. Set "Base Object" (in this Example: Job Information)
  4. Click Create

 

ConfigBusinessRules.png 

 

Then we can proceed with creating the rule.

*Note: Rules need to be kept as simple as possible,and there is a limit to the amount of propagation that 1 rule can handle (this may change in the future).

  1. Check "Always True" since we want this propagation to happen every time the field Location is changed.
  2. Select ->SET -> Timezone -> To Be Equal To -> Location.Timezone
  3. Click Save

    See Reference:

2.png

 

Once the Rule has been created this rule needs to be added to the Employee Central configuration and given a trigger.
First you need to decide which trigger(s) to use :

 Event Name Details
onSave When clicking save, the system will trigger the rule
onChange When changing the fields value, the rule will trigger
onInit Only applies to New Hire wizard process, if you would like this rule to trigger here

 In our case, we would like this rule to trigger when the Location field is changed.

 

Add Rule to Employee Central Configuration using "Manage Business Configuration":

  1. Admin Center -> Manage Business Configuration
  2. Select the object "jobInfo" on the left
  3. Find the field "Location and select "Defails
  4. At the bottom of the object, find the "Trigger Rules" section
  5. Add your Rule and the Event Name
  6. Click Save

 

If you do not have "Manage Business Configuration", you will need to raise a case with Customer Success, who can add the Rule to the Employee Central configuration for you.
Please ensure you provide the Rule “code” and “name”, and also the trigger type(s) you wish to associate with the rule.

Example: 

  • FieldDefault
  • populateMyField
  • onChange

If you are unsure how to create rules, or have created rules but are unable to test them, please raise a case with Customer Success who can assist you with this process.
If you do not have Meta Data Framework (Generic Objects) enabled on your instance, please reach out to Customer Success who can enable this feature for you.

 

NOTE: When creating a Propagation Rule, the source field and the destination field MUST be of the same type. For example, if the field in the Location object were a "Date" field, then the destination field in Job Info would also need to be a "Date" field, otherwise the Rules Engine will not allow you to map the values. The same can be said if it is a Numberic String or even Picklist field!

Specifically Related Articles

Keywords

Propagation Propagate Auto-fill Object Foundation MDF , KBA , sf employee central , LOD-SF-EC-RUL , Business Rules & Event Derivation , LOD-SF-EC , Employee Central , How To

Product

SAP SuccessFactors HCM Core all versions