If statement not working with a textbox and a certain number

Hi all

I’ve got a small error and not sure if it’s a bug or not.

I have an “If statement” where if a code matches another code then do something, it works on pretty much every code in the column apart from this one: 2810-103 or any code like: 1234-123

I’ve figured out that any 4 digit code hyphen 3 digit code won’t work.

Now, If I go to the cell and copy another code and paste it into a formula it pastes the code, If i copy the code above it pastes the following: EpochToDate(26531625600).

I’ve tried everything and even typing the code into the formula manually won’t work, although the code in the formula is correct, it won’t.

Here’s a sample doc.

You are comparing two values of different types. You want to use If(thisRow.Code.ToText() ="1234-123", "code matches", "code won't work" )

It appears that Coda is automatically transforming 4digit-3digit from a Text data type to a Date/Time data type. (3digit-3digit isn’t triggering this change of data type). The Date/Time data type does not match the data type of the Text string in the formula.

Ander that is correct.

Is this a bug? Is there a way around this?


Thank you, that worked.

I did try ToText before posting but couldn’t get it to work.