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?

3X_8_3_834c93c2005989a1eafaf058da404443993787df.png

Solved Solved
0 10 2,908
1 ACCEPTED SOLUTION

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

View solution in original post

10 REPLIES 10

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

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

Aha. Yes. Enumlist. Any way around?

Maybe use IN()

Exactly , yes

IN (โ€œUโ€, [_THISROW].[1 Dokumentasjon] )

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

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()
)
)
)

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.

Well thatโ€™s odd!

Please post a screenshot of the entire expression.

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?

Top Labels in this Space