I have a list of venues in a Glide table. I want to be able to assign multiple Categories to each venue. I’m using a choice component to allow people to select multiple categories in order to filter the list of venues by the selected categories. The issue I’m encountering is that when a user selects multiple categories using the checkbox choice component, not all associated venues are showing up.
For example, here is my data. If I use the choice component to select Ice Skating plus another category, this venue does not show up:
I’m storing the selections in a text field then using a Single Value field as well as a Split Text field to create an array of the selections. The Category Match column to return “True” if the selected value is included in the Category column.
I also have a table of Categories with a relation to the Venues table and that is working well. What am I missing?
It may be the ‘space’ that the multi choice inserts between categories. Try to create a template column that takes your Category 1 column as the input, and then replace , (comma with a space) with a , (comma with no space). Then split that template column. See if that works.
Thanks for your quick response. Unfortunately, that didn’t fix it. The Category Match column is only returning true for venues with one assigned category.
If a user selects multiple catagories, does only one of the categories need to match to become true? Can you show how your IF column is set up? I think the IF column doesn’t work with arrays like you think it might.
Comparing an array to an array is tricky. It’s a little easier when you are comparing an array to a Lookup based array that’s based on rows. But in this case, both arrays are column based in a single row, so it’s a little bit of a different situation even though on the surface, an row based array looks the same as a column based array.
I haven’t played much with the new plugins, so there might be a better solution, but one option is that you may be able to use the Append Array plugin to append both arrays into one large array, then use the Duplicated Items plugin to check for duplicates in that large array. If there are duplicates, then that means that a match was found between the Venue Categories and the User Selected Categories.
@Jeff_Hager Very creative solution! Appending the arrays together and checking for Duplicates should provide Or/Any matching. And/All matching would be more challenging but possible. Could be a good candidate for a new plugin though… Compare Arrays with an option for Matches: None/Some/All would be great!
Glad it worked! Yeah, looking at your IF column, I’m guessing it’s just comparing one of the values. I don’t think it will work to compare an array to an array.