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 / Help with custom sorti...
Power Apps
Answered

Help with custom sorting on a SharePoint lookup column

(2) ShareShare
ReportReport
Posted on by 76
In this form the Status field is a SharePoint lookup column.  The Status lookup is coming from the "Sunday Lookup List" and has an associated StatusCode (0-4) column I'd like to sort by.
 
Sunday Request List is the main (form) list.  Status & StatusCode are the lookup columns.
 
 
Sunday Lookup List is the lookup list.
 
 
The Sunday Request List settings:
 
 
The "Sunday Lookup List" settings:
image 5
 
This is what I have so far in the Items property of the Status field.  This is where I need help with the syntax.
 
 
If anyone can help me out with the syntax here I'd really appreciate it!
 
Thanks,
-Greg
 
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at
    Hi gsr51
    You do not need quotes around "Order" for the AddColumns parameter.
    SortBvColumns(
       AddColumns(
          Choices([@’Sunday Request List’].Status), 
          Order,
          LookUp(
             'Sunday Lookup List',
             Title = Value
          ).StatusCode
       ),
       "Order",
       SortOrder.Ascending
    )

    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • gsr51 Profile Picture
    76 on at
    Thanks! That fixed the issue.  Appreciate you helping.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard