2510329 - UI Rule to set field as required is not working

SAP Knowledge Base Article - Public

2510329 - UI Rule to set field as required is not working

Symptom

For an MDF UI, created in Manage Configuration UI, we have created a simple UI rule.

This rule is created to set a field on the UI to be required based on some If conditions.

The rule is not triggering and the field never becomes required.

Environment

Metadata Framework - Manage Configuration UI

Cause

This is currently a known issue with engieering.

Resolution

The corresponding engineering team are working to resolve this issue. Currently there is no planed fix date.

Please use one of the following workarounds in the meantime.

Workaround 1:

If you trigger the rule on Change of each field referenced in the IF conditions of the UI, the rule will work on save of the portlet. 
You will receive an error that the field is required. 

Workaround 2:

The below example was created for a Payment Information UI, but can be adapted for use with any MDF object.

We can implement an on save, raise message business rule, triggered from the object.
This will raise an error message, preventing the user from saving, if the required field is null.

  1. Create a Message Definition,with an appropriate error text.
  2. Create a business rule, with the Object you are using as the base object.
    The below example will raise an error message is the required field is null and the Bank Country if France:
    9.png
  3. The rule is triggered onSave on the corresponding object Definition:
    11.png

For further information on creating a raise message business rule, please see the following KBA:
2092849 - How to create a Business Rule to validate data on change/save, and provide a Warning or Error message

Keywords

UI-6475, UI Rule, UI Rule, required, manage configuration UI , KBA , LOD-SF-MDF-UI , UI Config, Rules, Custom MDF Portlets on V12 & PP3 , LOD-SF-EC-MDF , MDF & EC2MDF Migration , Problem

Product

SAP SuccessFactors HCM Core all versions