Unable to fetch app definition: Unable to cast object

Hi I cannot access the application. I am getting this error:

Error:Unable to cast object of type ‘TextMetaData’ to type ‘EnumMetaData’./n

Please your help to solve it.

Thanks

0 11 404
11 REPLIES 11

Steve
Platinum 4
Platinum 4

This typically happens when you try to set the value of a column of type Enum or EnumList to a value that the column isn’t configured to allow.

In the configuration for o column of type Enum or EnumList, go to the Type Details section. The Values setting should include all acceptable values. If you’d like to allow values that aren’t explicitly configured here, make sure the Allow other values option is enabled.

@Steve I’m having this problem for the first time when I’m trying to add/edit/delete a record to a table that has no Enum or EnumList columns.
I have no idea where is the problem

Unable to add/edit/delete row in table ‘DIM_RECIBIDOR’. → Unable to cast object of type ‘TextMetaData’ to type ‘EnumMetaData’.

Seems like it’s related to a recent change I made around Table config.
On Are updates available? I’ve made an expression:

IFS(
	INDEX(DIM_CURRENTUSER[SERVICIO], 1)=(0<>0),
  	"READ_ONLY",
  INDEX(DIM_CURRENTUSER[ROL], 1)="Superuser",
  	"ALL_CHANGES",
  INDEX(DIM_CURRENTUSER[ROL], 1)="Operador",
  	"ALL_CHANGES",
  INDEX(DIM_CURRENTUSER[ROL], 1)="Observador",
  	"READ_ONLY"
)

I’m trying to fix it

Thanks! I made the changes and I can now enter the app.

I had to change [ROL] to “Allow other values”
Hate the fact that we have no info why this is needed, it makes no sense. It’s an Enum basetype Text and the options that I have are all Text

If your Enum (or EnumList) column has explicit values defined in the column’s Type Details section, only those values may occur in that column unless Allow other values is enabled. I agree that the error message is lacking.

Yeah, but there is no other value inside that Enum that is not inside the options I already typed.
It’s the UserSettings “table”

@Steve wrote this "typically happens when you try to set the value of a column of type Enum or EnumList to a value that the column isn’t configured to allow." I experienced it when transitioning an app from "legacy " to "consistent" handling of blank values and I don't think the presence of unallowed values was the cause:

Screen Shot 2022-02-12 at 19.23.40.png

 

When I changed the setting from "Legacy" to "Consistent" I suddenly got the following error:

Screen Shot 2022-02-12 at 19.32.49.png

 The solution involved changing the setting to "Allow other values" as you  indicated, but I didn't have any "other" values in my spreadsheet and I didn't really want to allow other values.  The way I worked around this was to duplicate all of the values that I have in the enum in the "valid if" formula.  This works but it was a lot of extra work and I wonder why it's necessary.

Escalated.

Does anyone have an update on this? When I delete a parent record with child records, I get this Error Message:

Unable to delete row from table 'Angebote'. → Unable to cast object of type 'TableRefMetaData' to type 'EnumMetaData'.

Please contact AppSheet Support for help with this.

Top Labels in this Space