Column Formula (IF Expression)

I need your help regarding the “IF” condition.

I have two columns, the BV1 (Enum with a value of Yes and No) and the BV1 Score(Number).

Formula in [BV1 Score] is IF([BV1] = Yes, “20”, “2”). On the first entry, the formula works and logs to the data source correctly, but when we update the same field, the formula works in the AppSheet but not updating correctly in the data source.

Please see the below screenshot:

image

image
***BV1 Score should be “20”

What is in your BV1score column I can’t see it in your pic?

1 Like

I find it weird that you didn’t put quotes around Yes, but did around number values.

IF( [BV1] = “Yes” , 20 , 2 )

Also, do you know about Yes/No type columns?

2 Likes

Yes, I know the Yes/No type columns. The client doesn’t want to use it for this app due to the button. It says No - Yes, instead of Yes - No.

Interesting. I never thought about the order being an issue. I just experimented on this, and it worked. Add this to the Yes/No column’s valid_if to affect the order:

LIST( TRUE, FALSE )

1 Like