Change a Username from studentID to the First Part of a User's Email
-
Open the Consumer Application in Studio and go to the Advanced Menu.
-
Find the application's User Record Mapping, then click the kabob menu and select Details.
-
Scroll down to the Field Mappings and find the username target field name. Again, click the kabob menu and select Details.
-
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 '' } -
Select the checkboxes for On Create and On Update, then click Save.

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