SAP Knowledge Base Article - Public

2977339 - National ID: How To Configure onChange Rules To Set Fields Required or Not Visible

Symptom

How to configure onChange rules to set fields required/not visible?

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

Environment

Employee Central - National ID

Resolution

Scenario 1: Set field Required/Mandatory

Step 1: Select Card type identifier

  • Go to Manage Business Configuration (BCUI)
  • NationalID
  • Select Country: (Example Italy)
  • Check Identifier: PASS

4cardt.png

Step 2: Create rule

  • Go to Configure Rule
  • select base object: National ID Information Model

2cardt.png

see

3cardt.png

Step 3: Add Onchange rule under field

  • Go to Manage Business Configuration (BCUI)
  • NationalID
  • select field: Card type
  • add Onchange Rule 
  • Save

Step 4: Test rule

  • Go to test user 
  • National ID Information
  • Select Field Card type:
  • Result: Field set to Required

1cardt.png

Scenario 2: Set field Not Visible

Step 1: Ensure that field attachment-id is configured to be visible in National ID portlet.

Step 3: Check for a user the field is visible.


Step 4: Configure an onChange rule scenario's rule with National ID Information Model base object as following:

Step 5: Add the rule as onChange to field country in BCUI > National ID portlet.

Step 6: Go to a user's profile > National ID > Change the country to USA and notice that the fild for the row/record where country is USA is not visible.

NOTE: You cannot make the field invisible for all the records because National ID is a grid portlet. In grid portlets, the field will be available for other records where the rule's condition is not met.

See Also

2456957 - How to default National ID Information fields in the Add New Employee wizard

3271938 - Setting National ID Attachment Field to Mandatory Using a Business Rule - Employee Central

2385330 - How to make more than one National ID Card Type Required in Add New Hire - Employee Central

2472101 - Defaulting 'Is Primary' to 'Yes' for National ID Information

3222339 - Validation Business Rule Execution on Deletion of Grid Portlets OR Empty Grid Portlets

2093378 - National ID validation issues - Employee

Keywords

National ID, mandatory, required, obligatory, Employee Central, rule, card type, field, Onchange, Onsave, Manage Business Configuration, BCUI, Identifier, visible, invisible, grid, address, phone, contact, relationship, property, configuration, validation, validate , KBA , LOD-SF-EC-PER-NAT , National ID - Config, Rules, RBP, UI , LOD-SF-EC , Employee Central , How To

Product

SAP SuccessFactors Employee Central all versions