Notifications
Announcements
No record found.
Hey Team,
I have an email id of an employee and while creating the UserId of that employee, I want the prefix of the email i.e. the part before @ in the email.
Eg: if email is Alex.Martin2@xyz.com then I want the userId = Alex.Martin2. So how can we do this, like we have split function in PowerApp, is there any function here we can use to get the above result?
Hi skd,
x++ has plenty of string functions, you can find them here: docs.microsoft.com/.../xpp-string-run-time-functions
You have many options to use these functions to achieve the goal.
One is here:
1) Use strFind to find the position of @ character.
2) Then use subStr to read part of the string, from beginning until the position that you found with strFind.
str name = "Alex.Martin2@xyz.com"; name = subStr(name,1,strFind(name,"@",1,strLen(name))-1);
Hey Nikolaos Mäenpää,
Thank you this helped me.
I had another question if in the above example I want it this way:
str email = Alex.Martin2@xyz.com; Name = Alex Martin2
How can I achieve this. I want to use the given email id to form the username. Remove the "." and add space between the first name and last name. Which methods can I use to achieve this? Pls help me.
Hey Ergun Sahin,
Thank you, this helped me. Please can you help me with the username query as well?
You already know how to get Alex.Martin2. Then use strReplace() to replace dots with spaces.
Okay, Thank you.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 660 Most Valuable Professional
André Arnaud de Cal... 549 Super User 2025 Season 2
Sohaib Cheema 307 User Group Leader