Cannot compare list with text

Hi.
In inittial value I for some reason get error “Cannot compare list with text”
I want an initial value if another column has the right value, and the initial value is a any-select expression.
How come appsheet cannot handle this?

image

It appears that your first part of the expression is producing an error.

Is the [1 Dokumentasjon] list type column by any chance?

2 Likes

Aha. Yes. Enumlist. Any way around?

Maybe use IN()

2 Likes

Exactly , yes :+1:

IN (“U”, [_THISROW].[1 Dokumentasjon] )

2 Likes

Needed to put it this way:
IFS(
IN(
“U”,[1 Dokumentasjon]
)=TRUE,
ANY(
FILTER(
dbo.Ansatte, [Epost]=USEREMAIL()
)
)
)

2 Likes

Hi @khuslid ,

Thank you. I had anyway suggested just the IN () part. Excellent that you have got it working per your requirements.

Also as per my understanding further TRUE is not required , because IN() itself returns TRUE or FALSE

So

IFS(
IN(
“U”,[1 Dokumentasjon]
) =TRUE ,
ANY(
FILTER(
dbo.Ansatte, [Epost]=USEREMAIL()
)
)
)

is same as

IFS(
IN(
“U”,[1 Dokumentasjon]
) ,
ANY(
FILTER(
dbo.Ansatte, [Epost]=USEREMAIL()
)
)
)

1 Like

Well, that was actually why I posted my reply. For others to see.
It does NOT work without the ()=TRUE.
I found that strange as well…

Oh Okay , thank you.

We may request @Steve to guide why this could be happening.

3 Likes

Well that’s odd!

Please post a screenshot of the entire expression.

1 Like

Well this was interesting…
I just did a final test, just to make sure I don’t mislead two senior Appsheet gentlemen.
The table has many simelar rows like this one. So I changed some of them back and removed =TRUE. Then this worked. But… then some of the old ones (with =TRUE) did not come up with initial value. So I changed more and removed the =TRUE, and suddenly THEY did not work either (only one of them). Changing back again, and it works. So very spooky. Both seems to work, but only in one or a few columns.VERY unstable! Is this an issue for support?