Error with single select column use in formula

Hi,

I have exact this same use case:

But when writing the formula:
if({SingleSelectColumn}=“Option1”,1,0)

I get the error:
“Inconsistent data types”

also the mentioned operator === does not work:
Syntax error at “…ctColumn}===“Option1”,…”. Unexpected char “=”.

Is this a regression?
Any hint, how to get it working?

many thanks
Michael

Hi Michael.

The reason you get that “Unexpected char” error is, because you are using the wrong quotion marks.

Try these formulars:

if({Single select} = "Value 1", 1, 0)

or

if({Single select} = 'Value 1', 1, 0)

grafik

Greetings
AkDk7

ok, that works indeed.
but my problem was a bit different.
i am reformulating my question… mmm, i can not do that any more…

On the same table, this works:
if({Single select} = ‘Value 1’, 1, 0)

But if you go through a reference of type “link to other records”, i.e.
if({Reference.SingleSelectColumn}=‘Option1’,1,0)

Then it does not work, it does not matter what type of quotation marks are used.
I always get the error “Inconsistent data types”. Which i think it is a bug.

But the workaround is now easy. Add a new column with the formula in the Table with the SingleSelectColumn and use that column for further evaluation in referencing tables.

1 Like

Yeah, that could be a restriction or maybe a bug as you said.
Most of the time I’m creating a reference column instead of doing domain like referencing. I find it a little bit easier to identify the referenced value.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.