User Display Names in our environment are in the form of LastName,FirstName (don't ask). What I want to do is extract the FirstName (to include in an email). There are two ways I can think of to do this, but I'm not having any luck getting the syntax right on either of them:
There are probably several other ways to do this that I'm overlooking, but I'm running out of patience trying to figure this out on my own. Any guidance or help would be appreciated.
Solved! Go to Solution.
Hi @ChadVKealey,
I you would like to get the FirstName from the User Display Name,
As @Anonymous said, you could use expression below to achieve your needs:
last(split(body('Get_user_profile_(V2)')?['displayName'],','))
Also you could take a try with expression below:
first(skip(split(body('Get_user_profile_(V2)')?['displayName'],','),1))
Please take a try on your side and let me know if your problem could be solved.
Best regards,
Alice
use the below function to split and get the first name. In this example i am using the output of the Get user profile action under Office 365 users.
Hi @ChadVKealey,
I you would like to get the FirstName from the User Display Name,
As @Anonymous said, you could use expression below to achieve your needs:
last(split(body('Get_user_profile_(V2)')?['displayName'],','))
Also you could take a try with expression below:
first(skip(split(body('Get_user_profile_(V2)')?['displayName'],','),1))
Please take a try on your side and let me know if your problem could be solved.
Best regards,
Alice
Thanks, that did exactly what I was looking for!
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
86 | |
60 | |
51 | |
44 | |
39 |
User | Count |
---|---|
89 | |
81 | |
74 | |
62 | |
44 |