cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Sort by ID

Team,

 

This is my first post in Power Apps, And just created SharePoint list and published app.

I see the list items are not getting sort based on list ID in App,Can any one please help me how can I make it.

 

Thanks & Regards,

Infanst_PowerAppDeveloper

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Sort by ID

Hi @infant_Dev ,

Do you want to sort your Gallery Items based on ID column of your SP list?

 

I have made a test on my side, please consider modify the formula within the Items property of the Gallery to following:

SortByColumns(
Filter('YourSPList', StartsWith(Title, TextSearchBox1.Text)),
"ID", /* <-- Modify formula here */
If(SortDescending1, Descending, Ascending)
)

8.JPG

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Resolver II
Resolver II

Re: Sort by ID

Hey,

 

just set your gallery's items field (in advanced option) to:

 

Sort(datasource/sharepoint list, ID, descending/ascending)

 

Hope this helps.

Highlighted
Dual Super User III
Dual Super User III

Re: Sort by ID

Hi @infant_Dev 

 

You can use Sort function if you wish to sort the items based on ID.
 
Sort(SharePointListName, ID, Ascending)
 
Third parameter represents the order of Sorting, this can be Ascending or Descending.
 
Also, if you want to expand this to multiple columns you can use SortByColumns function as:
 
SortByColumns(SharePointListName, ID, Ascending,Name,Descending)
 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Community Support
Community Support

Re: Sort by ID

Hi @infant_Dev ,

Do you want to sort your Gallery Items based on ID column of your SP list?

 

I have made a test on my side, please consider modify the formula within the Items property of the Gallery to following:

SortByColumns(
Filter('YourSPList', StartsWith(Title, TextSearchBox1.Text)),
"ID", /* <-- Modify formula here */
If(SortDescending1, Descending, Ascending)
)

8.JPG

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Regular Visitor

Re: Sort by ID

Tq for your gentle response

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,695)