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

Filter using toggle button not working along with sort

I'm tying to filter the gallery by the person who created items, and hide if the status is "Checked Out" using a toggle button. It showing error like below could you please assist.

 

raneesh_mr_0-1632820895684.png

 

4 REPLIES 4
zmansuri
Super User
Super User

If(HideCompleted.Value=true,

Sort(Filter('Visitor Log','Created By'.Email = User().Email && Status.Value<>"ChekedOut"),"ID",Ascending),

Sort(Filter('Visitor Log','Created By'.Email = User().Email),"ID",Ascending))

---------------------------------------------------------------------------------------------------------------------------


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

raneesh_mr
Helper I
Helper I

Thank you @zmansuri  for your quick update

 

I'm getting a delegation warning like below and the gallery not showing any value while toggle is true or false.

 

raneesh_mr_0-1632822987285.png

 

 

 

If you have less than 2000 records you can ignore delegation. Code is correct make sure you are using corrects column names. Try not filtering at all to see the output

---------------------------------------------------------------------------------------------------------------------------


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

raneesh_mr
Helper I
Helper I

The records are below 2k. 

When i apply 

Sort(Filter('Visitor Log','Created By'.Email = User().Email),"ID",Ascending) it showing items,

however the gallery is empty when i use the code you shared.

Instead of "Status" i can filter if "Check out date" is empty also.

Please advice.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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