Replace Email Domain in Nintex Form Variable

  • 25 October 2022
  • 1 reply

Userlevel 5
Badge +11

I'm working in the New Responsive Designer in Nintex Forms for O365. I'm using a People Picker control to select an employee. Then I have created a form variable utilizing the userProfileLookup function to get the user's email (ex. Works fine.


Now I need to create another form variable that removes the "" from the email and only has the "username" part stored in the variable.  Not having any luck so far. Any help is appreciated.



Best answer by bamaeric 25 October 2022, 20:09

View original

1 reply

Userlevel 5
Badge +11

I was able to figure this scenario out and answer my own question. I actually went a different route and used a People Picker field to get the Employee username to use in the form. I thought I would share how to do this in case someone else needs to do the same thing in a form.


  1. Add a People Picker control to the form (Name = Employee).

    • The Employee control returns a value like:
      i:0#.f|membership|;#Jones, Mike

  2. Create and configure a form variable.

    • Name = txtEmployeeUsernameOnly

    • Type = Text

    • Value =
      replace(replace([Form].[Employee], "i:0#.f\|membership\|", ""), "@([(.)(#)(,)(;)\s\w]+)", "")

  3. This formula yields only the user name ("mjones") and stores it in the variable.

  4. You can add the form variable inside a Label control to see the value after you pick a user in the Employee field.