Hi all,
First-time Powerapps user here (and non-dev) - I’m hoping someone can provide guidance to help me resolve a bug in the app I’ve built. Scenario is:
The Items property on the vertical checkbox currently does the following (all desired behavior):
I would also like to ensure that a user can enter text in the search box – without having any checkboxes checked. At present, if I type in the search box w/o any checkboxes selected, the vertical gallery disappears. How should I modify the code in Items to do this correctly? Current code is:
If(IsEmpty(FilterByStage.SelectedItems) && IsBlank(txtNameFilter.Text), Table1,
Filter(
Table1, 'Pipeline Stage' in FilterByStage.SelectedItems.Pipeline_x0020_Stage &&
StartsWith(Customer, txtNameFilter.Text)
)
)
Note: Changing “&&” to “||” in the Filter function breaks the checkbox functionality.
Any suggestions as to how I can resolve this?
Thanks so much for the guidance…
Thanks so much Randy. Your suggested code does make the search box work as desired, but there is a regression with the checkbox functionality, and as your comment indicates, I now realize that I probably didn't implement that properly to cover all scenarios. I've attached an image documenting key settings in my app. I use the Collect function for the checkboxes, which then is supposed to make selections in a (hidden) combo box. Per the docs, do I need to use a variable instead of Collect? if so, what would that look like (since my variable would have to be "whichever checkboxes are selected")? or is there still a way to use Collect?
Welcome to PowerApps - no-dev experience required!
You mention checkbox functionality, but I am not seeing where that even is in your formula.
In general though, your formula should be the following:
Filter(Table1,
(IsBlank(FilterByStage.Selected.Pipeline_x0020_Stage) || 'Pipeline Stage' in FilterByStage.SelectedItems.Pipeline_x0020_Stage) &&
(IsBlank(txtNameFilter.Text)) || StartsWith(Customer, txtNameFilter.Text)
)
Try to always avoid If statements in filter functions or Items properties unless absolutely necessary.
I hope this is helpful for you.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2