cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AGaudioASG
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
PowerAddict
Super User
Super User

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
PowerAddict
Super User
Super User

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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,906)