I want to create two picklists, where the chosen option in picklist1 determines the available options in picklist2. I created a table1 which contains one column with the main categories. I created a table2 which contains column1 with the subcategories and column2 with the main categories.
I wrote the filter for picklist2 as follows : =FILTER(Table2,"Table2[Column2]=$[Picklist1]") , which gives me an empty picklist2.
If I replace the reference to picklist1 and just enter the chosen main category : =FILTER(Table2,"Table2[Column2]=""Main Category 1"""), it does give me the subcategories belonging to Main Category 1.
You can follow the steps below to achieve similar use case:
Create a table1 with Main category as the column.
Create a table2 with column1 and column2. Notice that column2 ie Main Category is a picklist.
Create a table3 with column1 as the Main Category picklist and column2. Notice that the column2 has a FILTER formula that pulls all the sub categories from table2 that are under the main category in column1 of table3. The column has a formula =Filter(Table2, "Table2[Main Category]=[Main Category]") that can be used to create a sub-picklist in this case.
A table called MainCategories with the main categories
Another table called Subcategories. This table has all the subcategories and their related main categories from MainCategories table. The MainCat column is formatted to contain rowlinks from the MainCategories table
Here is how you would implement this in the App Builder:
Add an editable Datacell and set its type to variable. Change its format to rowlink from the MainCategories table. The Datacell's name is MainCat- the name will be used later.
To configure the second picklist, add another editable Datacell and set its type to variable as well. Change its format to rowlink, set source type to filter and set the filter source to =FILTER(SubCategories,"SubCategories[MainCat]=$[MainCat]")
Can you show the code where you do the same filter for the list but it has to meet/match multiple conditions? I.e. Main Category & 2nd Category must match for the filter?
If you'd like to add more conditions or criteria for a filter, you would create a new table to store the criteria, and in the filter formula, you would use the AND() operator to add the conditions.
Building on the example in this thread, this is what it would look like:
Create a new table to specify the desired criteria:
In an app, a rowlink/picklist to a table will display the first column of that table.
One idea you can explore though, is to point to a column in a specified row that is a rowlink/picklist to another table. An example of this is the Simple Survey template.
In the template, the Survey table has columns already formatted to rowlinks: