Enumlist dependent on previous enumlist (filtering)

lle3
New Member

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!

Solved Solved
0 7 521
1 ACCEPTED SOLUTION

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] )
)

View solution in original post

7 REPLIES 7

Steve
Platinum 4
Platinum 4

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

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.

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] )
)

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

Hello, can you go into more detail about what each term does here? I am new to AppSheet and I am trying to do something like what OP did.

Top Labels in this Space