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 Platform Community / Forums / Power Apps / Get the row from a tab...
Power Apps
Answered

Get the row from a table in PowerApps having maximum length of the string

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I have a table in PowerApps with column "Id"  (number column )and "Value" (string column). I want the row from the table where Value column has the maximum length.

For example:

IDValue
1abc
2a
3abcd

 

It should return abcd.

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @Anonymous ,

    This should do it

    First(
     Sort(
     AddColumns(
     YourTableName,
     "Longest",
     Len(Value)
     ),
     Longest,
     Descending
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    on at

    @WarrenBelz , it worked like a charm. 🙂

  • Community Power Platform Member Profile Picture
    on at
    1. @WarrenBelz , on the same note, If I want to append the blank spaces in the end of all the the remaining records in the table so that all the records will have length equal to the maximum length. How can we do that?
  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    @Anonymous ,

    Not easily

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard