SAP Knowledge Base Article - Public

3513405 - OnChange UI rule not working in UI portlet despite OnChange business rule conditions being met

Symptom

For example, if there are three fields in an MDF portlet cust_Test: Field A, Field B and Field C.

  • In Configure Object Definition > cust_Test, Field A has an OnChange business rule which sets the value for Field B to be 1 or 2. 
  • At the same time, an OnChange UI rule created in Manage Configuration UI is configured at Field B to make Field C mandatory if 1 is selected in Field B, and non-mandatory if 2 is selected in Field B. 

 

Environment

  • SAP SuccessFactors HCM Suite
  • SAP SuccessFactors Metadata Framework (MDF)



Reproducing the Issue

  1. Go to relevant UI portlet in employee profile. 
  2. Fill in a value for Field A. 
  3. The Onchange Business rule configured in Field A triggers and sets Field B's value to 1.
  4. The UI OnChange rule configured at Field B does not trigger to make Field C a mandatory field

 

Cause

Expected behaviour. 

Resolution

This is expected behavior. Update of field by business rule does not trigger the onChange UI rule and this is to prevent cyclic onChange effect issues.

As a workaround, you can add the same UI rule as onInit rule. 

See Also

2314757 - How to set up Configuration UI Rules

Keywords

SuccessFactors, MDF, custom MDF, UI, Employee Profile, OnChange, UI OnChange, Business Rule, mandatory, trigger.  , KBA , LOD-SF-MDF-UI , UI Config, Layout & Rules , How To

Product

SAP SuccessFactors HCM Core all versions