Enumlist dependent on previous enumlist (filtering)

Hey All,

I found some similar threads but still haven’t been able to resolve my exact case, so here goes:

I need a way for an enumlist to be dependent on another enumlist, to essentially to filter out values for the second enumlist. Enumlist1 is the name of the set of values whilst the enumlist2 is the values themselves. I would like enumlist2 to only show the values from the chosen sets from enumlist1. They both validate from the same table.

Thanks in advance! :slight_smile:

How does the app know which values go with which names?

2 Likes

Thanks for your prompt reply Steve!

To simplify, the relationship between both enumlists is equivalent to:
Enumlist1 = vegetable or fruit
Enumlist2 = banana, apple, celery, spinach

Based on the choice of enumlist1, it would filter out to choices of enumlist2. A row of data of each value already specifies whether it would be a vegetable or fruit. To phrase it differently, enumlist1 validates from the category field name and enumlist2 validates from the element/value field name; so enumlist2 always has an associated category.

2 Likes

Thanks for your support! However, that article (from what I remember) is for the type enum. For instance, if I wanted to choose more than one value from enumlist1, I want enumlist2 to show values with either of the chosen values.

Oh I see.

I guess Appsheet’s automatic dependent dropdown doesn’t work for EnumList.

You’ll have to use SELECT() and IN() on your 2nd dropdown’s Valid_if. Something like:

SELECT(
  other-table[col2] , 
  IN( [col1] , [_THISROW].[enumlist1] )
)
2 Likes

Spot on! Thank you so much for this!!! :slight_smile:

2 Likes