Custom validation to prevent a promotion increase without actual job promotion
In the model company design of the promotion section of a compensation/salary planning worksheet nothing prevents a planner from entering a promotion increase ($ amount) without actually selecting a new Job Classification for an employee from the “Promote” popup.
Reason for this topic / Problem :
For data consistency purposes customers may want to only allow planners to save a promotion increase for an employee once that employee’s Job Classification has been changed in the “Promote” tool.
However there are no standard columns or features that capture this requirement.
We need to add a new custom column in our template next to the promotion recommendation column and configure a custom validation formula in it as per the screenshot below.
After the worksheet is launched a planner who entered a promotion increase before using the “Promote” popup will get the following messages on mouse-over and on save :
Custom validations can contain complex formulas but are currently (as of 2H 2021) limited to 5 fields per template.
As a workaround to this 5 fields limit we can use the instructions tab of a worksheet to display an unlimited number of warning or error messages (workaround designed by Skip Jones from SAP below) – click to zoom in :
All materials in this article were inspired by recent implementations that are now live. Please highlight if you see anything that needs to be corrected or if you have encountered easier ways to meet customer requirements on this particular topic.
For consultants with provisioning access, please find below the promotion custom validation column code snippet below :
<comp-field-definition id=”customValidationPromotion” isCustomField=”true” isVisible=”true” type=”string” useFor=”salary” readOnly=”true” hidePercentage=”false” hideAmount=”false” percentageReadOnly=”false” reloadable=”false” displayOrder=”38″>
<comp-custom-field-formula><![CDATA[if(finPayGrade=payGrade && promotion > 0,”*”,””)]]></comp-custom-field-formula>
<comp-custom-validation-formula><![CDATA[if(finPayGrade=payGrade && promotion > 0,”false”,”true”)]]></comp-custom-validation-formula>
<comp-custom-validation-warning-title><![CDATA[Please promote the employee using the Promote tool (3 dots next to employee’s name) before entering a $ amount.]]></comp-custom-validation-warning-title>
<comp-custom-validation-warning-message><![CDATA[Please promote the employee using the Promote tool (click on the three dots next to the employee name) before entering a $ amount.]]></comp-custom-validation-warning-message>