cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Help!!, sorting/filter

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

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

View solution in original post

3 REPLIES 3
Super User II
Super User II

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

View solution in original post

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!

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

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (19,249)