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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SortByColumns and Form...
Power Apps
Answered

SortByColumns and Form Control

(0) ShareShare
ReportReport
Posted on by 149

Hello everyone,

I'm trying to achieve both a Form control where you can show only 'Completed', 'On going' and 'Not started' list as well as also view everything from the list (I have attached an image for a better understanding). An important note is, that my Form control works fine, it's just that I can't add SortByColumns at the same time in Items property. However, at the same time, I'm also trying to sort my Gallery, so that Not started is at top, On going is second and Completed is at the bottom and at the same time sort this with when a ticket was created (DateCreated).

 

Please let me know, if my question doesn't make sense! 

SortByColumns(Filter([@'Job Instruction - Feedback App'], "FeedbackCompleted",["Not started","On going", "Completed"], If(
 Gallery5.Selected.Value = "All",
 'Job Instruction - Feedback App',
 Filter('Job Instruction - Feedback App',
 FeedbackCompleted = Gallery5.Selected.Value
 )
 )
 )
)

'

Rama96x_0-1630413422258.png

 

Categories:
  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @Rama96x ,

     

    The Sort by Column will always sort either in ascending or Descending alphabetical order in Both case The sequence which you want to achieve wont be possible. 

    In more suggestion is Try binding value of Not started first than On going and than Completed this way you will get the item sequence as per your requirement. 

     

     

    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.

  • Rama96x Profile Picture
    149 on at

    Yeah, that makes sense that the sequence I'm trying doesn't work then... 😄 Do you have a more specific function name that I can look into in order for me to bind the values and at the same time have a Form control? 

    Also a side note, which I forgot to mention in my question is that I also want to sort by DateCreated.

    So, Not started, On going and Completed (this exact order) and then sort these by Date they were created 🙂 

  • Verified answer
    Rama96x Profile Picture
    149 on at

    I figured this out! If anyone is interested: You can wrap a SortByColumns inside another SortByColumns, and by that, you can start Sorting for, let's say, Date created and after you can tell it to Sort in a specific order. The code is down below: 

     

    If(
     Gallery5.Selected.Value = "All",
     SortByColumns(SortByColumns('Job Instruction - Feedback App', "DateCreated", Ascending
     ),"FeedbackCompleted", ["Not started","On going", "Completed"]),
     Filter(
     'Job Instruction - Feedback App',
     FeedbackCompleted = Gallery5.Selected.Value
     )
    )

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard