When I use my app on my phone/tablet, enum li...

(Kristen Davis) #1

When I use my app on my phone/tablet, enum list values appear that are not in the list of enum values for that column. The column allows other values to be added in the app and it appears these are the values selectable in the app but not in the enum list. How can I fix this?

I recently updated many of the enum list values to simplify the list, but all of those old values (including values that were on the enum list for the column and I deleted) still show up. Wondering if uninstalling and re-installing on my phone and tablet will correct the issue?

Thanks in advance!

(Kristen Davis) #2

I changed AutoCompleteOtherValues to false and the “old” values do not appear in the app. Is this the best fix?

I would like to be able to add new values to the enum list in the app and have them as available options in the future, however, I would like to be able to remove the “old” values as well.

(Steven Coile) #3

Uninstalling and re-installing will not fix the problem.

(Steven Coile) #4

If you allow other values in an Enum or EnumList column, any value stored in the column–whether an explicitly defined Enum value or not–is considered a defined and therefore allowed value.

Because you had defined and allowed other values, those values may be present in the spreadsheet. Removing the definitions from the column definition does not removed the values from the spreadsheet; you’d have to remove the values in the spreadsheet manually, e.g. by editing the spreadsheet directly.

(Steven Coile) #5

You have several options:

  1. Remove the undesired options from the column (e.g., by editing the backend spreadsheet directly). Once removed from the column, AppSheet will no longer make them available as options. Then configure the column to disallow other values to prevent undesired options from occurring.

  2. Or, leave the other values in the column, and define a Valid_If formula for the Enum or EnumList column that generates a list of allowed values. This option is cumbersome, but allows you to retain the existing values but hide them from being offered as options. If you choose this option, you may consider undefining the Enum values in the column definition so as to not have to maintain redundant lists.

(Aleksi Alkio) #6

Yes, it’s doing exactly that. Unfortunately that won’t filter old values away because those values are still in your table. You could remove the AutoCompleteOtherValues option as you have done and then read values from that column with SELECT expression. If you would like to add some new values, you can add them to your formula like SELECT(TableName[Column],[Timestamp]>“1/18/2019”)+LIST(OptionA,OptionB,OptionC)

(Kristen Davis) #7

@Aleksi_Alkio alternatively, when I have a value I would like to permanently add to the enum list, I could manually add it to the column values, and achieve the same result, correct?

This would require adding the value twice, but I am a true novice and willing to accept a little extra work to maintain simplicity and understanding of how my app functions.

(Aleksi Alkio) #8

No need to add values to your table. You can add as many values as you like with the LIST(…) formula.