Hey everyone,
i got a problem..
i have list of projects within an excel file with details of them. one column has the project managers names.
i have to extract the name and use "search for users" to send them a reminder mail.
So i fill an string array with the names of these project managers:
the problem is - i only get an result when the name in the column is written like "Surname, name. I dont get a result/output when it's like "Name Surname"
what do i gotta do?
can i automate it like:
if there is not a "," in it do following: take name1 in varString1 + take name2 in varString2 then search for users "varString2 + ", " + varString1" ?
Hi @ManishSolanki,
How can i check this? Is there a possibility like: Apply to each -> condition: columnName does not contain ", " -> if yes: do "join(reverse(split(variables('varFullName'),' ')),', ') --- if no: append directly w/o any change
??
Hi @fokumus007
In that case first check the username with as is format "Surname, Name" and further check the result. If the result is empty then we can check the username with "Name, Surname" format. Not a good solution but a sort of workaround 🙂
If this helps, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks
thanks for the solution but there is a problem:
some of the names in this column are in "Name Surname" format which i try to change as i described but there are also names in this column that are already written like "Surname, Name".
In this case your expression would change all of the columns like "Surname, Name" to "Name, Surname,". How can i solve this?
Hi @fokumus007
You can use the below expression to transform the name into 'surname, firstname' format:
join(reverse(split(variables('varFullName'),' ')),', ')
pls replace variables('varFullName') with the output of Select action or to the item of an array that holds the name as 'firstname surname'.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks
WarrenBelz
146,587
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional