How to Change Static Text if Dynamic Data is Empty

I’m working on a text element in Bubble that contains a mix of static and dynamic data. Here’s an example of what I’m trying to achieve:

Meeting link: “Current User’s Standard Link [dynamic data]”

The issue is, if the dynamic data (in this case, the user’s meeting link) is empty, I want the entire static message to change to something else, like:

“We will send a link”

So instead of just showing “Meeting link:” with nothing after it, I want the whole message to switch if the link is not available.

How can I set up this kind of conditional logic within the text element?

ps: it’s in a workflow inside an arbitrary text

Hi, just go to the conditional tab of your text element and create the rule:

  • When current user standard link is empty
  • text: “We will send a link”

Hope this help :slight_smile:

1 Like

it’s in a workflow inside an arbitrary text

Not sure I understand well. It’s like you have a custom state of type Text. And you have this workflow to set the state with the Arbitrary Text you mentionned?

If it’s the case then use the condition in the action. And set the default state of the custom state with the ‘empty’ sentence.

No,
image
I want to change the yellow underlined text when the following dynamic data is empty

You can use the same approach in here:

Simply, check if that thing is empty and format as text for yes or no values. For yes, put some message. For no, put the actual meeting link with whatever text you want.

2 Likes

I’m sorry, but what operator should do that check? I read earlier this from my notes I saved, but in that case it was used a split by, will this same operator work in the present case?

Is empty should be available to a lot of things and even in this case it should be available.

Simply, you will do this. In this picture, red rectangle:

You will delete the Link de renuado and after the expression that ends with ...find & replace, you will continue and choose is empty and then format as text.

In the yes, you will type the no meeting message. In the no, you will put whatever in that red rectangle now.

1 Like

Thank you very much, Hergin!

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