Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Create a drop-down list dependent on the 2 or more previous drop-down

Hi AppSheet community,

I'm stuck and could use some help... My need is as follows: I want to create a form allowing me to have drop-down lists that filter automatically according to the previous choice in the shape of indexes (1.1 / 1.1.1 ...). I'd like to be able to do this on 3 or even 4 levels, but I can't manage more than 2 at the moment.

My form is in an allocation table. Layer 1 is simple because it's based on a table from which I retrieve the various values I want. For Layer 2, I have an index table (see second screen) to which my Layer 2 field is referenced and thanks to this formula FILTER(“INDEX ME COC”,[_THISROW].[Layer 1]=[Layer 1]) I can obtain a filter for Layer 2.

But it's for Layer 3 that things get complicated, as the same operation with a new Layer 3 index table doesn't work.

Can you help? Do you have a better solution for this type of filtered enum?

Thank you in advance!

Have a nice weekend

 

Pierre09999_1-1741961536372.png

 

Pierre09999_0-1741961446351.png

 

Solved Solved
0 1 72
1 ACCEPTED SOLUTION

Hi!

Use a FILTER() function in the Valid_If of your Layer 2 column:
 
FILTER(
  "INDEX ME COC",
  [Layer 1] = [_THISROW].[Layer 1]
)

Use a FILTER() function in the Valid_If of your Layer 3 column:
FILTER(
  "INDEX ME COC",
  AND(
    [Layer 1] = [_THISROW].[Layer 1],
    [Layer 2] = [_THISROW].[Layer 2]
  )
)

If you want to keep adding layers, simply add conditions to the AND() for example:

Use a FILTER() function in the Valid_If of your Layer 4 column:
 
FILTER(
  "INDEX ME COC",
  AND(
    [Layer 1] = [_THISROW].[Layer 1],
    [Layer 2] = [_THISROW].[Layer 2],
    [Layer 3] = [_THISROW].[Layer 3]
  )
)

 

View solution in original post

1 REPLY 1

Hi!

Use a FILTER() function in the Valid_If of your Layer 2 column:
 
FILTER(
  "INDEX ME COC",
  [Layer 1] = [_THISROW].[Layer 1]
)

Use a FILTER() function in the Valid_If of your Layer 3 column:
FILTER(
  "INDEX ME COC",
  AND(
    [Layer 1] = [_THISROW].[Layer 1],
    [Layer 2] = [_THISROW].[Layer 2]
  )
)

If you want to keep adding layers, simply add conditions to the AND() for example:

Use a FILTER() function in the Valid_If of your Layer 4 column:
 
FILTER(
  "INDEX ME COC",
  AND(
    [Layer 1] = [_THISROW].[Layer 1],
    [Layer 2] = [_THISROW].[Layer 2],
    [Layer 3] = [_THISROW].[Layer 3]
  )
)

 

Top Labels in this Space