web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Substring (?) // Searc...
Power Automate
Unanswered

Substring (?) // Search for users // no matching

(0) ShareShare
ReportReport
Posted on by 23

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.

2023-06-09 12_56_33-Edit your flow _ Power Automate und 3 weitere Seiten - Geschäftlich – Microsoft​.png

 

So i fill an string array with the names of these project managers:
2.png

 

 

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"
3.png

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" ? 

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,169 Moderator on at

    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

  • fokumus007 Profile Picture
    23 on at

    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?

  • Manish Solanki Profile Picture
    15,169 Moderator on at

    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

  • fokumus007 Profile Picture
    23 on at

    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 
    ??

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 463

#1
Valantis Profile Picture

Valantis 463

#3
11manish Profile Picture

11manish 264

Last 30 days Overall leaderboard