SAP Knowledge Base Article - Public

2919193 - How to use Business Rules to Validate Candidate Age - Recruiting Management

Symptom

  • This article describes how to use Business Rules in Recruiting to validate age, for e.g., Legal Age.
  • Besides checking the value, you can clear out the value entered, in case there are any age requirement, so if the field is required, the candidate won't be apply to the Requisition. These instructions are also provided in this article.
  • This rule will only be executed on the UI.
  • Notice that the article intends to show the Business Rule feature capability and let the users be more familiar with the tool. The rule described can have different behaviors on different system. Please reach out to your Implementation Team and/or Partner for implement the same if you are having any issues with it.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.  

Environment

SAP SuccessFactors Recruiting Management - All Versions

  • Business Rules in Recruiting

Resolution

Rule to validate Birth Date:

  • Candidate Profile and Job Application rules are not supported when Mobile Apply is enabled. Business Rules for Mobile Apply are on road map and will be enhanced on further releases (2866437 & 2781775).
  • The same rule structure can be applied to Job Requisition, Candidate Profile, Job Application and Offer Letter. Please, make sure to select the correct template while creating the rule.
  • When selecting a template, you will only be to work within the selected scenario. For example, if you create a Candidate Profile rule and you want to have the same on the Job Application, you must create a Job Application rule as well.
  • The rule structure will be based on the standard Date of Birth field.

Sample Case: Validating the Legal Age on the Birth Date field.

Base Object: Job Application

Trigger Event: OnChange

Steps to create the rule:

  1. Go to Configure Business Rules and click Create New Rule.
  2. Select Recruiting option and choose Configure Business Rules on Job Application.
  3. Type the Rule Name and Rule ID.
  4. You can leave the Start Date as it is.
  5. Description if desired.
  6. Select the Job Requisition attached to the Job Application that will be used.
  7. Click Continue

  8. On "IF" parameter, set the field which you to do the validation. In this case Date of Birth. Then select "Is not equal to" and "Null". This is required to ensure that the rule will not be triggered in case the field is empty.
  9. Now you need to add another condition. For that, open the dropdown, open Add and select the Parent Add option.

  10. After adding a new condition, click o the "+".
  11. On the first dropdown, select Difference In Years Round Up() and select the inequality symbols. The options will be Equal, Under, Under and Equal, Above, Above and Equal and Not Equal To. In this sample, the Under and Equal is used.
  12. Select Number and the desired age.
  13. From Date: Select the field same field used before. In this case Date of Birth.
  14. To Date: Today()

  15. On "THEN" parameter, set the first option to "Raise Message".
  16. On "Message" select the message you want to throw it. For more information on how to create message, please refer to the article  2610536 - RCM Business Rules: Raise Message
  17. You can choose any severity type.



    The next steps will instruct you to use the rule to also clear the information from the field if the value entered is invalid. It's important to make it clear on the message what was the error. In case you don't want to have this scenario, you can move to step 20.

  18. Click on "Add Expression" on the right side of the rule.

  19. Then on the first option, select "Set" the field where the validation will occur (Same as above steps), select "To be Equal to" and "Null". This will make the rule to turn the field value into "Null" after the message is raised, therefore every time a wrong value is entered, the field will be automatically cleared. 

  20. Save the rule. You will be able to modify it anytime.
  21. Go to Manage Rules in Recruiting.
  22. On Job Application section, select the template.
  23. On Field Change Rules (onChange event type), select the field and the rule.
  24. Save the changes.

See Also

2610536 - RCM Business Rules: Raise Message

2866437 - Business Rules on Job Application are not triggering - Recruiting Management

2781775 - Business rules are not getting triggered for Candidate Profile - Recruiting Management

2618607 - Manage Rules in Recruiting Management

2704222 - Business Rules Are Not Being Saved - Recruiting Management

Keywords

Rule, Recruiting, Birth Date, Age, Legal, Validation, Under, Above, Birthday , KBA , LOD-SF-RCM-RUL , Recruiting Rule Issues with MDF Platform , How To

Product

SAP SuccessFactors Recruiting all versions

Attachments

Pasted image.png