Need help with appsheet dropdown enum.

Hello community, I am new to appsheet.

I am using an enum list to display options I want to write to a google sheet tab, the selectable listed options are:

Apple, Grape, Pear, Lemon, Watermelon.

Each one of these options has a code:

Apple=FR101  -  Grape=FR108  -  Pear=FR131  -  Lemon=FR105  -  Watermelon=FR110

I want the user to be able to select the fruit and depending on the selection I would like the Code of that fruit to be written to the column in google sheets.

I am looking for 2 methods to accomplish this: 

1. Directly in the app with something like a switch statement for small lists.

2. With a product with codes table/tab, where it would list the fruits in the dropdown but write the code depending on the selected fruit.

Any help, suggestion or solution is appreciated.

Solved Solved
0 4 159
1 ACCEPTED SOLUTION

Easy-peasy. Make another table with 2 columns; fruit code and fruit name. Load it into the app. Set the code as the key, and name as the label. In your main table, set the column to be a Ref to this new table.

https://help.appsheet.com/en/articles/961426-references-between-tables

https://help.appsheet.com/en/articles/1023086-what-is-a-key

https://help.appsheet.com/en/articles/961466-row-labels

 

View solution in original post

4 REPLIES 4

Easy-peasy. Make another table with 2 columns; fruit code and fruit name. Load it into the app. Set the code as the key, and name as the label. In your main table, set the column to be a Ref to this new table.

https://help.appsheet.com/en/articles/961426-references-between-tables

https://help.appsheet.com/en/articles/1023086-what-is-a-key

https://help.appsheet.com/en/articles/961466-row-labels

 

Thanks Marc, it works great, one question though, is it possible to assign a default value since it is referenced?

When I try to put in Apple as a default value it obviously writes Apple into the sheet instead its code.

Yes.

>>"When I try to put in Apple as a default value it obviously writes Apple into the sheet instead its code."

So then what do you think you should put in to signify an Apple, besides "Apple"?

Got it, thanks for the help.

Top Labels in this Space