I am trying to edit a single cell in a table via an edit screen. On the edit screen I want to get a list of options for “Meal” based on selection of a “health_tag_filter_u” (multiple health tags are linked to each Meal). The “health_tag_list” is part of the “meal” table containing health tags for each meal in an array format. This edit screen is on another table/sheet where I am storing “health_tag_filter_u”.
This works in case of single selection but not in case of multi-selection. Please help for implementing this in multi-selection.
I think the problem is because the health_tag_filter_u is formulating a comma delimited list of values, which isn’t an array. ‘High Fiber’ works as a single value, but ‘High Fiber, Vegan’ is also a single value, which doesn’t exist in health_tag_list in the meal table. Since Forms do not run computed column values until they are submitted, I think you may need to create a custom form to handle this. That way you can write your filter choices directly to a user specific column in a table, then use a Split Text column to convert it to an array, and finally use that to filter your meal choices.
There is another option where you could use a New Screen instead of a Form Screen. Add a choice component for you filter that writes to a user specific column in either the user profile or in the parent table, then use the Split Text column to convert the choices into an array. Then add a Form Container that would only contain your meal choice component, and set the meal choice filter based on the Split Text array in the parent table or user profile.
Thanks a lot @Jeff_Hager ! As suggested, I created a custom form and I am able to filter using multiselect - by using split text to first create an array and then relating it to the health tag field in the meal table. Then I use this relation as the source for the Meal choice component.
I would like to use 4 such multi-select filters in the same form. But relation only allows single variable matching - that will give me 4 relation columns. How can I find the common elements in those 4 columns? Or is there any other way to implement this?
You can use a Query column instead of a Relation.
Since I am using multi-select option, I will have to relate the 2 tables on 2 array columns. Can we use a query column to match array columns of 2 tables?
I think so. A Query column is kind of like a relation, but instead of matching a single column in each table, you query an entire table and set as many filters as you want. I believe normal filters work well with arrays, so it should be the same within the query column.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.