Conditional text formatting?

Hello, how could I format a text field?
I have this text field in my RG which displays a number ( usualy 0 , 1, 2 or 3)

Then my RG looks like this-

Which makes it a little hard to focus, and I would like to hide the 0 values

But there is no such option on the text element?
Do I have to put the values to the ‘state’ of the element, or is there a more straightforward approach?
Thank you!! :robot:

You can’t refer to a text’s value in other places, only the datasource of the text directly…

So, in your case use: ‘when search for drivess:count is 0’ as the condition.

1 Like

Thanks Adam!
From the coding perspective wouldn’t it make the same request to the database that we already made to display the text and stress the DB ?

From the coding perspective wouldn’t it make the same request to the database that we already made to display the text and stress the DB ?

Shouldn’t do, no…

From the Bubble docs:

But if you’re worried then you can store the data somewhere else on the page and refer to it that way instead.

1 Like

Wow, cool! Didn’t knew bubble worked that way, thanks!
I guess the devs are always two steps ahead! :nerd_face:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.