Change conditional field for negative number

Hey guys,

Racking my brain here with a conditional state problem. Apologies if this is really simple and I’ve missed something.

I’m trying to change the Conditional field for a dynamic text field that populates from an API. I want to make positive growth numbers green and negative numbers red.

By default I have it green, but I want to make it so when the number comes as a negative number (eg, -1.23) I want it to change red. I’ve tried both of the following with no luck:

When (API’s value) is <0
When This Text’s value :formatted as number: is <0

I’ve also tried the reverse where having it red by default and changing when >0.

It seems like Bubble isn’t recognising the minus for the negative number. Any ideas?

Anyone? This is killing me at the moment.

Hmm…maybe try the less than or equal too

But sounds like the API value is coming in as text rather than number…

Ahhh that might be what it is - the text rather than number.

Annoyingly I can’t do if it contains “-” as bubble automatically turns that into a 0