How to Change Username values on the User Record
  • 31 Jul 2023
  • 1 Minute to read
  • Dark
    Light

How to Change Username values on the User Record

  • Dark
    Light

Article summary

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

  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.
    Change studentID to first part of Email.png

  6. The next time the User jobs are run, check in the Data Explorer to ensure that the data is being applied correctly.


Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence