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 / Help!!, sorting/filter
Power Apps
Answered

Help!!, sorting/filter

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi So I built an app and they liked it so much they wanted another one just like it.

 

So I had a gallery in my first app that has this code

 

SortByColumns(
If (
CheckboxManage.Value, Filter( 'Scheduled Courses', Category.Value = "Management"
&& (DatePicker3.SelectedDate <= StartDate || DatePicker3.SelectedDate = Blank())
&& (DatePicker2.SelectedDate >= EndDate || DatePicker2.SelectedDate = Blank()) ),
CheckboxConstruct.Value, Filter( 'Scheduled Courses', Category.Value = "Construction"
&& (DatePicker3.SelectedDate <= StartDate || DatePicker3.SelectedDate = Blank())
&& (DatePicker2.SelectedDate >= EndDate || DatePicker2.SelectedDate = Blank()) ),
CheckboxEngine.Value, Filter('Scheduled Courses', Category.Value = "Engineering"
&& (DatePicker3.SelectedDate <= StartDate || DatePicker3.SelectedDate = Blank())
&& (DatePicker2.SelectedDate >= EndDate || DatePicker2.SelectedDate = Blank()) ),
CheckboxOther.Value, Filter('Scheduled Courses', Category.Value = "Other"
&& (DatePicker3.SelectedDate <= StartDate || DatePicker3.SelectedDate = Blank())
&& (DatePicker2.SelectedDate >= EndDate || DatePicker2.SelectedDate = Blank()) ),
CheckboxSafe.Value, Filter( 'Scheduled Courses', Category.Value = "Safety"
&& (DatePicker3.SelectedDate <= StartDate || DatePicker3.SelectedDate = Blank())
&& (DatePicker2.SelectedDate>= EndDate || DatePicker2.SelectedDate = Blank()) ),
Search( Filter( 'Scheduled Courses', (DatePicker3.SelectedDate <= StartDate || DatePicker3.SelectedDate = Blank())
&& (DatePicker2.SelectedDate >= EndDate || DatePicker2.SelectedDate = Blank())), TextSearchBox1.Text, "Title" )) , "StartDate" )

 

This formula filters by date, by checkbox and by search box and sorts by StartDate. And if no filters are in place then all the line items in the gallery are visible. 

 

This worked perfectly in my first app. My second app, I enter it, it does NOT return an error but also does not display anything. see pictures below. Can anyone please help!

 

Original App

old.png

 

New App

New.png

 

Categories:
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Wow that's one long expression!

    Have you compared the settings of both of your apps? Is there any difference in the Advanced Settings l8ie Explicit Column?

    Also, are you seeing any delegation warnings (blue line under the expression)? Are they both pointing to the same data source?

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes everything was the same across the board.

     

    But I flicked the Explicit columns switch (which was untouched in the original app) and it started workings. So what ever voodoo you just did worked. Thanks!

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

    Thanks,
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard