Human Capital Management Blogs by Members
Gain valuable knowledge and tips on SAP SuccessFactors HCM suite and human capital management market from member blog posts. Share your insights with a post of your own.
cancel
Showing results for 
Search instead for 
Did you mean: 
MSTan
Explorer
774

Introduction

SuccessFactors Business Rule does not provide a direct split function when it comes to manipulating strings, such as splitting a string into multiple parts based on a delimiter. Instead, organizations can use a combination of string manipulation function like indexOf() and substring() to achieve the expected outcome.

Use Case: Splitting a String into Multiple Variables

Scenario

An organization has created a custom MDF object with the external code such as text1-text2-text3-text4, where each part of the string represents a specific attribute (e.g. Department, Location, Pay Grade, Employee ID). The organization needs to split this string into 4 separate variables for further processing.

Step-by-Step Implementation

1. Define the 4 variables field in custom MDF object:

MSTan_0-1739525222924.png

2. Create a Business Rule, set purpose as Evaluate.

MSTan_1-1739525370927.png

3. Assign the Business Rule to the field externalCode in the custom MDF object.

MSTan_2-1739525743321.png

4. Test Solution - Create a new data for custom MDF object.

MSTan_3-1739526213599.png

Click Enter, the values of variant1-variant4 are automatically populated.

MSTan_4-1739526375202.png

In some cases, the input string may not always have the same number of parts. For example, the string might have fewer delimiters, such as text1-text2. The solution handles such cases gracefully.

Conclusion

By leveraging functions like indexOf() and substring(), organizations can handle complex string formats and derive meaningful insights from their data. 

 

1 Comment
xavierlegarrec
Product and Topic Expert
Product and Topic Expert
0 Kudos

Really cool, thanks for sharing !

Labels in this area