The business rules in SuccessFactors are a powerful tool, that allows us to automate several processes, including propagating values to different fields or validating values as per the different business scenarios, among other examples.
From a configuration perspective, the recommendation is to keep the complexity as minimal as possible since it may impact the performance of the system (we all know how easily we can end up with heavy business rules). However, depending on the business scenarios and often due to legal requirements and/or integrations with third-party systems, we need to ensure that the system validates and stores accurate data.
The purpose of this blog is to present some of the text-based functions that can be useful during a SuccessFactors Implementation project.
When it comes to text fields, the below functions can be potentially used based on the business requirements:
Function Name | Description |
Substring () | Extracts characters from a string to create another string. |
Concatenate() | It is used to join two or more text strings into one string. |
IndexOf() | Returns the position of a specified character or substring within a supplied text string. |
Matches() | Check if a string matches a Java regular expression. |
toUpperCase() | Converts all of the characters in the given text to upper case. |
toLowerCase() | Converts all of the characters in the given text to lowercase. |
Condense() | Removes consecutive whitespaces within a text string or replaces them with a single blank space. It also automatically removes any leading or trailing whitespaces from the string. |
Format() | It is used to combine different data types (for example, numbers, text, etc) into a meaningful text. |
Length() | Counts the number of characters in a string, including any spaces, and returns the number |
Below you will find a list of scenarios that I came across during my several implementation projects. You’ll see how we can easily reach our goals by using the functions described above (they are sorted from lower to higher complexity).
Let’s start with an easy requirement. In this business scenario, the customer would like to have the last name always in capital letters. To achieve that, the function toUpperCase() can be used:
This is a very common requirement. In the e-mail address or first name/last name usually customers don’t want to have leading/trailing whitespaces, or even any duplicate whitespace. To achieve that we usually use the condense() function.
This function operates in 2 different modes:
1 - Replace consecutive whitespaces with one single blank space
2 - Remove all whitespaces
In this business scenario, the customer just wants to allow characters between A-Z and whitespaces in the preferred name. To achieve that you can use the matches() function. Here is an example:
In this requirement, the customer would like to ensure that the first character of First Name and Last Name is always a capital letter. This is a medium complexity requirement since we need to use a combination of functions.
Let’s take the example below. If a user types “paul” in the first name, then the system should update the value to “Paul”. The advice here would be to think about all the steps that we need to follow to reach the goal.
In the picture above, we can see that we should start by splitting the first name into 2 strings. In the first string, we would have just the first character and we need to ensure it is always in upper case. In the second string, we don’t need to apply any rule (we can use it as it is) but we need to drop the first character, as we don’t need anymore this value since it’s part of the first string.
After that split, we need to concatenate the final 1st string in upper case with the 2nd string. Below is an example of how we can achieve that:
This is a common requirement especially if customers would like to have a Full Name field in the Personal Information portlet. In this case, we have concatenated the first name with the last name and added space between them by using the function format():
This may not be a common requirement but it can come across during the project implementation. The business scenario here was to set a field as non-visible if the legal entity has a certain text value in its name.
Let’s take the below example:
All companies with “Best Run” in their name should not be able to see/edit the Job Group (custom field) on the Hire Form.
There are multiple ways to achieve this requirement, but here the proposal is to use the IndexOf() function.
This function returns the position of a specified character or substring within a supplied text string and returns null if it doesn’t find the supplied text string.
This means that if we get a null, the company name doesn’t have “Best Run” – so the “Job Group” field should be displayed.
Here is an example of a possible solution:
This brings me to the end of this blog.
Depending on your business scenario, you can use the functions described above, or a combination of them, to build validations and/or propagate text values to different fields.
With the flexibility of business rules, you can easily guarantee initial capitalization for certain fields, string concatenation, validation of a certain text in a string, capitalization only, special characters validation, whitespace removal, among others.
Please, take a look at the detailed documentation in Implementing Business Rules in SAP SuccessFactors.
I hope this blog will help you create rules for text fields easily. Looking forward to your comments and questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |