I'm looking for help with the filter widget, in particular filtering values by previous expressions. I’d like to set up filters on two fields that contain multiple values delimited by a semicolon. For the first filter, I’d like the user to be able to select one or more options from a list of predefined multiple values and I’d like that selection to filter the available values in the second filter. Is this capability available for contains clause with multiple predefined values? The filter widget documentation seems to imply that it should be, but I’m not seeing the option to do so in the expression builder. When I switch the clause to “is” I do see the option to filter by previous expression, but this won’t work for my field which contains multiple delimited values. Is this expected behavior?
Solved! Go to Solution.
@HaileyWright1 your 100% correct, sorry for the confusion. Please submit and idea to add "Values filtered by previous expressions." would be a great improvement for Experience Builder.
The issue you had here is not specifically related to the 'contains' operator. It is related to predefined values. ('Contains' operator only supports user input & predefined as sources)
Given that predefined values could be manually typed in and do not have anything to do with the original data source (e.g. for domain fields, users can type in 1/2/3/... first and then update their subtype fields later), we did not include the "Values filtered by previous expressions" option - it is not the same list unique values that are dynamically populated, but rather a static list per users' choice.
That's the reason why you do not see that option in your case.
I can't believe you posted this 9 hours ago. I am seeing the exact same problem. I have this setup so that it will only show me communities within Council District X if one is selected in the previous filter. However, it still shows me the entire list of communities from the entire city. Seems like a bug.
I think it needs to be in a Set. I recall fighting with this filter functionality.
It currently has some test data, you can view the filter results here. Hope this helps!
Thanks @RyanBohan you're right, it has to be a set. The language is a bit confusing. Maybe it should say "Values filtered by previous expressions within set"
Your issue above is different from what Hailey had.
You have only one clause in the screenshot, telling me you used multiple filter items, with a single clause in each of them, like this:
It won't work because there is only one expression existing for each, hence no previous expressions at all. (there is only one previous filter item)
The "Values filtered by previous expressions" option does not necessarily need to be within a set, but all the information needs to be in one filter item (multiple clauses/clause sets inside one SQL Expression Builder) - that's the meaning of "previous expressions":
See two individual clauses (not inside a set) that have that option as expected.
Thanks for the replies. I’m glad the clause set worked for you @BrittanyBurson. Unfortunately in my case, the issue is not that the filter by previous expression functionality isn’t working (it works fine with is (=) clauses), the issue is that I don’t even see the setting to apply it when using contains (like) clauses. I’m thinking it’s a limitation of the many to many relationship here as both of my fields that I’m trying to filter contain multiple values delimited by a semi colon. Hoping for a bug, not a table redesign 😛
The issue you had here is not specifically related to the 'contains' operator. It is related to predefined values. ('Contains' operator only supports user input & predefined as sources)
Given that predefined values could be manually typed in and do not have anything to do with the original data source (e.g. for domain fields, users can type in 1/2/3/... first and then update their subtype fields later), we did not include the "Values filtered by previous expressions" option - it is not the same list unique values that are dynamically populated, but rather a static list per users' choice.
That's the reason why you do not see that option in your case.
@HaileyWright1 your 100% correct, sorry for the confusion. Please submit and idea to add "Values filtered by previous expressions." would be a great improvement for Experience Builder.