Need help with Dependent Dropdowns

Hello,
I am trying to make an inventory management app which requires to fill a form to add a new product entry. There are 2 dropdowns , Product category and Product name. I was successful in making Product Name dropdown depending upon the Product Category dropdown through Valid IF field expression and it worked perfectly. But now I need the app to switch data to selected language depending upon the user choice through USERSETTINGS() (while maintaining the functionality of Dependent Dropdowns ) .
I am a beginner in AppSheet and donโ€™t know much about what type of expression should be used.

Thank you

Solved Solved
0 3 97
1 ACCEPTED SOLUTION

I would recommend a slight Table change which will make this easier - especially if you should need to add languages in the future.

Instead of separate columns by language, you would have a Language column which you mark for each row. So your columns would be:

  • Serial No.
  • Language
  • Plant Category
  • Plant Name

This will simplify management of the columns (actually throughout the entire app) and allow you to write a dependant dropdown expression like this:

SELECT(Plants[Plant Category], [Language] = USERSETTINGS("Language"))

AND

SELECT(Plants[Plant Name], AND(
                               [Language] = USERSETTINGS("Language"),
                               [Plant Category] = [_THISROW].[Plant Category])
)

YES, this will force you to have double the rows in the table but, trust me, it will be MUCH simpler in the long run to deal with.

View solution in original post

3 REPLIES 3

You might refer to this support article first to see if it helps. If you still have questions, let us knowโ€ฆ

Hi John
Thanks for the link. The issue is I have 2 pairs of columns for both English and Hindi language for Plant category and Plant Name.

I need the Plant Name field to populate the list according to Plant Category selected before. I easily did so with the โ€œValid Ifโ€ expression, but the issue is I have to give the user a language switch option.
When I switch the language through the USERSETTINGS() option, the data changes to the respective language, but the dependency breaks. Now, the Plant Name dropdown shows every option irrespective of the Plant category selected before.

I need to have working dependent dropdown which switches language with USERSETTINGS().

Thanks

I would recommend a slight Table change which will make this easier - especially if you should need to add languages in the future.

Instead of separate columns by language, you would have a Language column which you mark for each row. So your columns would be:

  • Serial No.
  • Language
  • Plant Category
  • Plant Name

This will simplify management of the columns (actually throughout the entire app) and allow you to write a dependant dropdown expression like this:

SELECT(Plants[Plant Category], [Language] = USERSETTINGS("Language"))

AND

SELECT(Plants[Plant Name], AND(
                               [Language] = USERSETTINGS("Language"),
                               [Plant Category] = [_THISROW].[Plant Category])
)

YES, this will force you to have double the rows in the table but, trust me, it will be MUCH simpler in the long run to deal with.

Top Labels in this Space