Dependent enums in form not working

Hello everyone,

I am using a table "Types" which has the following structure.

type_idtype_nametype_group
1type 1group 1
2type 2group 2
3type 3group 2

I am using a form in another table "Cases" where I have two columns, both of the type = Enum (base type = text):

  • case_type_group
    configured with Valid If: Types[type_group]
  • case_type_name
    configured with Valid If: Types[type_name]

When using the form, to create a new case, I

  1. first want to choose the case_type_group
  2. and show the case_type_name-options depending on the case_type_group-selection

Unfortunately, the case_type_group doesn't show up in the form at the beginning. Only the case_type_name shows up. As soon as I choose a case_type_name, the matching case_type_group appears. (I choose "type 2, and group 2 shows up).
I want to have it the opposite way. (I want to choose group 2, and type 2 & type 3 should appear) How can I achieve that?

Thanks in advance!

Solved Solved
0 3 59
1 ACCEPTED SOLUTION

Aurelien
Google Developer Expert
Google Developer Expert

Hi @jonasjonas 

You probably have the answer here:

Dependent drop-downs - AppSheet Help

Drop-down from Valid_If - AppSheet Help

Drop-down on a Ref column - AppSheet Help

 

The solution would probably be:

 

SELECT(Types[type_name],
  [type_group]=[_THISROW].[case_type_group]
)

For reference:

SELECT() - AppSheet Help

 

View solution in original post

3 REPLIES 3

Aurelien
Google Developer Expert
Google Developer Expert

Hi @jonasjonas 

You probably have the answer here:

Dependent drop-downs - AppSheet Help

Drop-down from Valid_If - AppSheet Help

Drop-down on a Ref column - AppSheet Help

 

The solution would probably be:

 

SELECT(Types[type_name],
  [type_group]=[_THISROW].[case_type_group]
)

For reference:

SELECT() - AppSheet Help

 

Thank you very much.

Aurelien
Google Developer Expert
Google Developer Expert

You are welcome ! 

Top Labels in this Space