If I have an email address of first.last@company.com and my username format is first initial + last name, would this work in a formula?
email.scan(/\w+\)[0].slice(0)+email.scan(\w+\)[1]
Best Answer
Y
Yean Shan Chain
said
over 2 years ago
Hey Joseph, doing it in 1 formula will slightly complicated. You can simplify this by putting them into 2 steps.
1. To get first name and last name from email - Here is the formula you can refer to
MessageStep 2.split("@")[0]).split(".")[1]
2. To formulate the username, you can have a variable action and within the variable action, make use of formula to extract the first initial from the email data pill and concatenate with the output in the above step.
Answer
Y
Yean Shan Chain
said
over 2 years ago
Hey Joseph, doing it in 1 formula will slightly complicated. You can simplify this by putting them into 2 steps.
1. To get first name and last name from email - Here is the formula you can refer to
MessageStep 2.split("@")[0]).split(".")[1]
2. To formulate the username, you can have a variable action and within the variable action, make use of formula to extract the first initial from the email data pill and concatenate with the output in the above step.
Joseph Chan
How to convert an email address into a username?
If I have an email address of first.last@company.com and my username format is first initial + last name, would this work in a formula?
email.scan(/\w+\)[0].slice(0)+email.scan(\w+\)[1]
Hey Joseph, doing it in 1 formula will slightly complicated. You can simplify this by putting them into 2 steps.
1. To get first name and last name from email - Here is the formula you can refer to
2. To formulate the username, you can have a variable action and within the variable action, make use of formula to extract the first initial from the email data pill and concatenate with the output in the above step.
Yean Shan Chain
Hey Joseph, doing it in 1 formula will slightly complicated. You can simplify this by putting them into 2 steps.
1. To get first name and last name from email - Here is the formula you can refer to
2. To formulate the username, you can have a variable action and within the variable action, make use of formula to extract the first initial from the email data pill and concatenate with the output in the above step.