Hi @ShirleyN @kevinzlin
I understand that this is a difficult problem because ASDB is a service based on Google Tables, but I report it because it is an obvious bug for the citizen developers that AppSheet is targeting.
Enum in AppSheet Database only accepts pre-registered Option; trying to register a Value or any other Value set on the AppSheet Editor will result in an error.
Enum setting in ASDB
Enum settings in AppSheet Editor
Then I can't add the record with option B and option C.
For example, if we want to create Enum columns for a country, it is very inefficient to specify each one with an ASDB option.
I think the standard usage is to use AppSheet's Valid if to list the columns in LIST type.
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua and Barbuda
Argentina
Armenia
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Brazil
Brunei
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Central African Republic
Chad
Chile
China
Colombia
Comoros
Congo
Costa Rica
Cรดte d'Ivoire
Croatia
Cuba
Cyprus
Czech Republic
Democratic Republic of the Congo
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Eswatini
Ethiopia
Fiji
Finland
France
Gabon
Gambia
Georgia
Germany
Ghana
Greece
Grenada
Guatemala
Guinea
Guinea-Bissau
Guyana
Haiti
Honduras
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
Israel
Italy
Jamaica
Japan
Jordan
Kazakhstan
Kenya
Kiribati
Korea, North
Korea, South
Kosovo
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Mauritania
Mauritius
Mexico
Micronesia
Moldova
Monaco
Mongolia
Montenegro
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
New Zealand
Nicaragua
Niger
Nigeria
North Macedonia
Norway
Oman
Pakistan
Palau
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Poland
Portugal
Qatar
Romania
Russia
Rwanda
Saint Kitts and Nevis
Saint Lucia
Saint Vincent and the Grenadines
Samoa
San Marino
Sao Tome and Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Sudan
Spain
Sri Lanka
Sudan
Suriname
Sweden
Switzerland
Syria
Taiwan
Tajikistan
Tanzania
Thailand
Timor-Leste
Togo
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
United States of America
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Vietnam
Yemen
Zambia
Zimbabwe
Valid if is not for the "list the columns in LIST type" for that the AppSheet has the Suggested
value field, Vaild if field is used to validate the record which is being inserted via that specific
enum column.
For the AppSheet databases which is not allowing other values just because passing the
"pre-registered Option" works as a validation for the Enum column in ASDB similar to Valid If
field in the Appsheet application tableโs column.
I tested this and it seems that the behavior is not consistent. When using "Dropdown", there is no option "Allow other values" and it doesn't allow other values than in the list in ASDB. But when using Text type, there is that option, and you are able to add new values from the app. Though that option doesn't affect are you able to add a new value or not via the app.
Sorry, I guess my capture was wrong.
But this is a topic that I feel is not simple to use Enum in ASDB.
I recommend against using AppSheet Database. Consider using Google Sheets instead.
๐ฏ
These two posts report issues on similar lines.
Kanban - Workstream & "Added Sub-Workstream" Colum... - Google Cloud Community
In the following post, @Fabian_Weller has suggested a solution similar to Aleksi's.
error message: "Unable to add row to table โ Inva... - Page 2 - Google Cloud Community
Thanks @Suvrutt_Gurjar @Steve
This topic brought me to this comment by Steve.
I think this is important knowledge for users who are considering using ASDB.
I too was about to consider the possibility of using ASDB, but my concern is growing.
User | Count |
---|---|
18 | |
11 | |
7 | |
4 | |
3 |