cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mohammedaabdu
Frequent Visitor

Reverse a string

How can I reverse a a full name and add a comma between each word?

 

Example: ”Johan Ericsen” should be ”Ericsen, Johan”

2 ACCEPTED SOLUTIONS

Accepted Solutions
ansrikanth
Resolver III
Resolver III

something like this should work.. 

With(
    {names: Split("FirstName LastName"," ")},
    Concatenate(Last(names).Result, ",", First(names).Result)
)

obv, this presumes you have only firstname lastname (no middle names and a space between names)

 

Thank you

-Srikanth

View solution in original post

@Mohammedaabdu 

I just gave firstname and last name as an example.. like how you gave an example of "Johan Ericsen".. If I have to use your example it self in the formula then it would be .. 

With(
    {names: Split("Johan Ericsen"," ")},
    Concatenate(Last(names).Result, ",", First(names).Result)
)

Hope that clears .. 

 

Thank you

-Srikanth

 

View solution in original post

8 REPLIES 8
ansrikanth
Resolver III
Resolver III

something like this should work.. 

With(
    {names: Split("FirstName LastName"," ")},
    Concatenate(Last(names).Result, ",", First(names).Result)
)

obv, this presumes you have only firstname lastname (no middle names and a space between names)

 

Thank you

-Srikanth

Himanshu_90677
Super User
Super User

Concatenate( LastName, ", ", FirstName )

I dont't have last and first name..

I dont't have last and first name..

@Mohammedaabdu 

I just gave firstname and last name as an example.. like how you gave an example of "Johan Ericsen".. If I have to use your example it self in the formula then it would be .. 

With(
    {names: Split("Johan Ericsen"," ")},
    Concatenate(Last(names).Result, ",", First(names).Result)
)

Hope that clears .. 

 

Thank you

-Srikanth

 

Himanshu_90677
Super User
Super User

try This

Mid(User().FullName,Find(" ",User().FullName)+1) & ", " & Left(User().FullName, Find(" ",User().FullName)-1)

thank you very much!

Thank you sir!

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,498)