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 / SortByColumn with Sear...
Power Apps
Unanswered

SortByColumn with Search and Filter

(0) ShareShare
ReportReport
Posted on by 151

Hi i have some filtering and searching which is working fine, but i want to add in a sorting to the column called "investigatian status", the 'investigation status" column is a choice column with 

- Not Started

- In Progress

- Completed 

 

 i want to either sort by descending or sort "Not Started" as the first one.

 

My code so far, everything is working fine until the SortByColumns function:

 

Filter(DenmarkUAI, StartsWith('Customer name', SearchDK.Text)
&& (CBProdInvDK.Selected.Value in 'Products involved'.Value || CBProdInvDK.Selected.Value = Blank())
&& (CBReasonUAIDK.Selected.Value in 'Reason for UAI'.Value || CBReasonUAIDK.Selected.Value = Blank())
&& (CBStatusDK.Selected.Value in 'Investigation Status'.Value || CBStatusDK.Selected.Value = Blank()));
SortByColumns(DenmarkUAI, "InvestigationStatus", Descending)

Wolfmeyn_0-1665128779413.png

 

Categories:
I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Wolfmeyn ,

     

    Can you try the below code,

    SortByColumns(
     Filter(
     DenmarkUAI, 
     StartsWith('Customer name', SearchDK.Text) && 
     (CBProdInvDK.Selected.Value in 'Products involved'.Value || CBProdInvDK.Selected.Value = Blank()) && 
     (CBReasonUAIDK.Selected.Value in 'Reason for UAI'.Value || CBReasonUAIDK.Selected.Value = Blank()) && 
     (CBStatusDK.Selected.Value in 'Investigation Status'.Value || CBStatusDK.Selected.Value = Blank())
     ),
     "InvestigationStatus", Descending
    );

     

    Hope it helps.

  • Wolfmeyn Profile Picture
    151 on at

    Invalid arguments it says 

    Wolfmeyn_0-1665135129694.png

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard