SAP Knowledge Base Article - Public

2540412 - UI Rule to Set visibility for field based on a separate field selection

Symptom

  • Need to hide the visibility of a field in the UI based on the Value from a Picklist parent object
  • Want to know how to use UI rules to hide specific fields on custom UI

Environment

  • SAP SuccessFactors HXM Suite
  • SAP SuccessFactors Employee Central

Reproducing the Issue

  1.  Navigate to 'Admin Center' > 'Manage Position'
  2. Create new Position
  3. Select a value from the parent pick list
  4. Result:
    All other fields show regardless of value selected in the picklist

Resolution

  1.  Navigate to 'Admin Center' > 'Manage Configuration UI'
  2. Create New Object
  3. Select Base Object (in my example I select 'Position'
  4. Set up the fields for this object
  5. Create a UI Rule
    UIRule.JPG
  6. This rule has to account for all the options in the pick list
  7. Set your If Condition for hiding the fields
    VisibilityNo.JPG
  8. Set the 'Else If' condition for the fields you want to show as visibile
    VisibilityYes2.JPG
  9. Save the Rule
  10. Navigate to the Parent Object, and edit the details
  11. Select the rule you just created in the 'onChange UI Rules' section > Click OK
    ObjectDetails.JPG
  12. Save this Custom UI
  13. Last you need to set this as the 'Default Screen' for the Object in 'Configure Object Definition' > Save Changes made
    ConfigObjDef.JPG

Note

Please be aware if a field is being hidden via UI rule or field properties from the UI level - it will not take effect on the History panel showing change. If the field is hidden from the object level, then it works as expected.

Keywords

sf ec, sfec, success factors, Custom visibility, custom ui, UI rules, , KBA , LOD-SF-MDF-UI , UI Config, Layout & Rules , LOD-SF-EC-MDF , MDF & EC2MDF Migration , LOD-SF-EC-RUL , DO NOT USE - Business Rules & Event Derivation , How To

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HXM Suite all versions