Populating UserID with Attribute Values via Identity Manager Validation Script
search cancel

Populating UserID with Attribute Values via Identity Manager Validation Script

book

Article ID: 263372

calendar_today

Updated On:

Products

CA Identity Suite CA Identity Manager

Issue/Introduction

This article describes how to configure a Create User task in Identity Manager to automatically populate the UserID field using the value entered in another attribute field (e.g., Full Name) upon data entry.

Environment

Identity Manager

Resolution

To automatically populate the UserID field based on another attribute, use the validation JavaScript feature within the task profile.

  1. Open Task Profile: Navigate to the Profile screen for the relevant Create User task.
  2. Configure Field Validation:
    • Locate the attribute field you wish to use as the source (e.g., Full Name).
    • Set the Validate On Change property to Yes.
  3. Implement Script:
    • In the Validation JavaScript field, enter the following code:
function validate (FieldContext, attributeValue, changedValue, errorMessage)  {     // Set the UserID (%USER_ID%) to the value of the source attribute   FieldContext.setFieldValue("%USER_ID%", attributeValue);     return true;  }

Additional Information

  • Trigger Mechanism: The validate function triggers when the user modifies the source attribute field and moves the focus to another field.
  • Persistence: The UserID attribute will update dynamically based on the current value provided in the source field.