cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
poloboyyur
Frequent Visitor

Filter based on Yes/No with dropdown

I have a visitor check in app where once you check in on my list it changes VisitorStatus to yes. When the person presses check out it changes to no but the filter is not working. Any help on how to fix this. 

 

 

Capture2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

@poloboyyur ,

I will try to simplify this so I can check my understanding is correct - this code

With(
   {wStatus:Dropdownl.Selected.Value = "Checked In"}
   Filter(
      Visitors,
      VisitorStatus = wStatus
   )
)

Looks at the item selected in Dropdown1 and if it is Checked In sets a temporary Boolean variable of true (or false if it is not Checked In ). It then filters the List Visitors where the column VisitorStatus matches this Variable.

Is any of this incorrect?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @poloboyyur ,

You can shorten that code to this

With(
   {wStatus:Dropdownl.Selected.Value = "Checked In"}
   Filter(
      Visitors,
      VisitorStatus = wStatus
   )
)

but I can see a button there (not a drop-down). What does the button do?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

@WarrenBelz 

The code is not working for me. It still does not separate the people who are checked in versus those who are checked out.  The checkout button logs the time in the SharePoint list of when the visitor leaves. I have put a picture of the checkout button code below. In my code VisitorStatus is a Boolean data type.

 

Capture3.PNG

@poloboyyur ,

I will try to simplify this so I can check my understanding is correct - this code

With(
   {wStatus:Dropdownl.Selected.Value = "Checked In"}
   Filter(
      Visitors,
      VisitorStatus = wStatus
   )
)

Looks at the item selected in Dropdown1 and if it is Checked In sets a temporary Boolean variable of true (or false if it is not Checked In ). It then filters the List Visitors where the column VisitorStatus matches this Variable.

Is any of this incorrect?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,359)