Change a Username from studentID to the First Part of a User's Email

RapidIdentity Platform Documentation

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US
  1. Open the Consumer Application in Studio and go to the Advanced Menu.
  2. Find the application's User Record Mapping, then click the kabob menu and select Details.
  3. Scroll down to the Field Mappings and find the username target field name. Again, click the kabob menu and select Details.
  4. Change the Value Type from Field to Expression, then add the following script to the Value field:
    function()
                            {
                            const email = SRC.email[0];
    
                            if (email && typeof email === 'string') {
                            const emailSplit = email.split('@');
    
                            return emailSplit[0]
                            }
    
                            return ''
                            }
  5. Select the checkboxes for On Create and On Update, then click Save.
  6. The next time the User jobs are run, check in the Data Explorer to ensure that the data is being applied correctly.