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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Reverse a string

(0) ShareShare
ReportReport
Posted on by 33

Hi,

 

Is there a function to reverse a string?

 

Example:

HelloWorld -> dlroWolleH

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    1)create a button onselect  property

     

    ClearCollect(colReverse,Split( "HelloWorld", "" ));
    Clear(colReverseOrder);
    ForAll(colReverse,Collect(colReverseOrder,{Result:colReverse[@Result],Order:CountRows(colReverseOrder)+1}))

     

    2)Add a label to show the collection (colReverseOrder) in a reversed order and all rows concatenated:

    Concat(SortByColumns(colReverseOrder,"Order",Descending),Result)

     

    output display on:

    Sujikumar_0-1677063805209.png

     

  • SoPatt Profile Picture
    Microsoft Employee on at

    No, but this works:

     

     

     

    Set(Word,"HelloWorld");
    Set(WordLen,Len(Word));
    ForAll(Sequence(WordLen),
     Collect(Letters,
     {
     Letter:Mid(Word,Value,1),
     Index:WordLen-Value
     }
     )
    );
    Set(Word,Concat(SortByColumns(Letters,Index),Letter));

     

     

     

     

  • Community Power Platform Member Profile Picture
    on at

    i try on our code  it showing error display on concat 

     

     

    Sujikumar_0-1677064560828.pngSujikumar_1-1677064615752.png

     

  • SoPatt Profile Picture
    Microsoft Employee on at

    Concat should be capitalized, and quotes around Index in SortByColumns.

  • SoPatt Profile Picture
    Microsoft Employee on at

    The problem with this is that it depends on ForAll running sequentially over each letter, which ForAll does not guarantee.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard