Hi there, I’m hoping someone can help me work through this challenge.
I’m attempting to only show results if all of List A is in List B. List B is stored as a custom state using the same type of content as List A. It’s in a custom state as the user is selecting options from a list.
I found a forum that suggested using :filtered when searching for the data source. I did this and it works when only 1 result is displayed, but when more than result is no results are given.
For example:
-
My content type is “Cocktails.” Each entry has a list of “Spirits” that it requires.
-
The user can add the “Spirits” they have, which puts these into a custom state list using the same content type as the “Cocktails” Spirits list.
-
There are two cocktail entries 1) Manhattan which has vermouth and whisky on its Spirits list. 2) Appletini which has vodka and schnapps on its Spirit list.
Scenarios
- If the user adds Spirits that matches just one of the cocktails, it returns the cocktail successfully.
- If the user adds Spirits that matches both of the cocktails, it doesn’t return any. So, for example, if they added whiskey and vodka.
- If the user adds Spirits that matches one of the cocktails, but also no cocktails, nothing is returned. For example, adding whiskey and gin.
Below is the data source filter I’m using. Any help would be much appreciated!
