Re: Filter Gallery and show ALL items when nothing is selected from dropdown
Heya!
Yeah that's pretty much right - when you combine multiple it can be a bit trickier, and you might need to wrap them in brackets to ensure that the parts of the filter you Do want to work still get done.
I'll give a few examples here based on the line you provided, this one if empty will ignore all other filters:
(also be careful of using 'in', as its not delegable, so if the item you are looking for is out side of the 2000 item limit, it will only show blanks as it can't find past the initial 2k items)
Filter(BleepBloop,
IsEmpty(collectionLocationFilter) || locationName in collectionLocationFilter.locationName
|| IsBlank(testname) || testname = "woozle" || Day() = 7
)
This one separates the logic blocks using brackets, but still has the same issue that if the first one is empty then none of the other logic will be checked as the whole statement is already defined as 'true':
Filter(BleepBloop,
(IsEmpty(collectionLocationFilter) || locationName in collectionLocationFilter.locationName)
||
(IsBlank(testname) || testname = "woozle")
||
(Day() = 7)
)
But to really separate the logic we need both && and ||
Filter(BleepBloop,
//Either option in this condition, if first is true then second is not evaluated
(IsEmpty(collectionLocationFilter) || locationName in collectionLocationFilter.locationName)
// AND either of these conditions, if first is true then second is not evaluated
&&
(IsBlank(testname) || testname = "woozle")
// AND, even if the above two condition sets are not met, the below filter must apply
&&
(Day() = 7)
)
If you need any help with the && || logic, start a new topic and tag me into it - I like doing these and/or groups 🙂
I'm on most days, but sometimes there may be some delays with me responding as work can get busy