Hi,
I have a filter that uses a combo box & am am using a method to get around delegation. All working fine but I want to address how to show all records if nothing selected in the combo box.
In other functions I would just add ||cbstatus.Selected.Result=Blank()) but not sure where to put it. Ive tried a few varioations but cant get it to work.
My filter is
Filter(Col3,
Or(
'mycolumn'.Value = First(cbstatus.SelectedItems).Value,
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,2)).Value,
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,3)).Value,
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,4)).Value,
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,5)).Value,
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,6)).Value
)
)
Thanks in advance
Todd
Solved! Go to Solution.
Hi @Tango ,
Something like this should do it
Filter(
Col3,
(
Len(cbstatus.Selected.Value) = 0 ||
(
'mycolumn'.Value = First(cbstatus.SelectedItems).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,2)).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,3)).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,4)).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,5)).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,6)).Value
)
)
)
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
Hi @Tango ,
Something like this should do it
Filter(
Col3,
(
Len(cbstatus.Selected.Value) = 0 ||
(
'mycolumn'.Value = First(cbstatus.SelectedItems).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,2)).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,3)).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,4)).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,5)).Value ||
'mycolumn'.Value = Last(FirstN(cbstatus.SelectedItems,6)).Value
)
)
)
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
Hi @Tango ,
I use Len() as it covers both Blank() and empty string ""
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
Thanks @WarrenBelz no error message but not returning any results which I know are there.
In addition, when i select an option form the dropdown all the records appear and not the actual filter
User | Count |
---|---|
152 | |
94 | |
85 | |
77 | |
58 |
User | Count |
---|---|
194 | |
175 | |
106 | |
96 | |
90 |