if text is empty = $0.00 hey guys how do i do this in bubble ?
The simplest way is to use a conditional expression (that evaluates to a yes/no) in the text box itself (not on the conditionals tab) then use:format as text
to set the text to display.
i.e. in your text box use something like: Despesa: [parent group's thing's Despesa is empty: format as text]
For yes enter $0.00
For no enter $parent group's thing's Despesa
Alternatively you could just use a conditional.
When Search for Things: item #2 is empty, Text = Despesa: $0.00
is there another way? because I’m using search
It makes no difference, just do the same thing (i.e. set the conditional statement in the text box and set the yes and no values accordingly).
Alternatively, as @nico.dicagno suggest, you can simply use a regular conditional for this with the same conditional expression (the reason I didn’t suggest that initially was I assumed you were using a single text box for all the text you were displaying, which would have got very complicated - but it looks like you’re using a separate text box to display each line, so either method will work just as easily).
I will try this way
Honestly @adamhholmes , i know that more than a month has passed but i wanted to thank you for making this post and reminding me of the existence of conditional formatting.
When i first saw it, i thought it was quite neat that a conditional could be avoided by just putting the condition directly in the datasource. But then i realised that this allows for conditionals to be mixed in one single expression, assembling a multi-dimensional conditional piece by piece, and all in one place. Before i was exhausting the full matrix of possible combinations one at a time, which meant lots of conditionals. Holy *** thats powerful ahah.
Its something which i thought bubble was missing.
Thank you very much, ive been going around my app merging some conditionals and making them way more efficient and readable
Did you manage to get this working?
I second this. Although, I’ve known about it and use it but I see @adamhholmes and others presenting this solution often and it should be one of the #1 bubble tips… "You can almost do anything in Bubble by just using “Format as Text”, ask @adamhholmes
This topic was automatically closed after 70 days. New replies are no longer allowed.