Wait until text changes to do something

Hi,

I have textfields that change when data from an API comes in. But the data that may be from last view may be there, or the text fields may be blank.

I would like to cover these fields until the data comes in. I tried this with timing, but it doesnt work well, because the time in which the text changes is variable.

So basically I want to put a shape over the text fields, and have ti disappear when the text under it changes.

Can someone think of a good way to do this?

How does the data get from the API to the text field?

There are many possible ways it could happen, so a general answer would be:

Using the conditional tab for the text value, altering the text or the visibility, or a conditional for the containing group.

Well, upon page load, a workflow grabs data from an API and puts stuff into user fields. There are some math.js calcs that use this data to create the information. When everything is loaded and math.js has done its thing, the correct answer is there.

I dont see anything in the conditional part that say s “when text changes”…

Are you saying to add a step, perhaps to the workflow, at the end that changes a state of something and then visibilityy is based on that? The might work, except for the math.js part which I don’t know how long it takes.

Correction - using a similar dynamic expression that the text uses for its value.

If you are using a plugin, the element would be exposing the value which you can use in a conditional, you can check for not empty for example.

If you are using your own script, and need to get the value to a Bubble, you can use Toolbox Javascript to Bubble. This also gives you a workflow event if you need it.

OK I got this working. The great majority of the delay was dealing with the API calls. At the end of the API calls I set a boolean state for a cover that went over the text to false. Then using a conditional I changes the visibility based on the value of the boolean.

Works great.

1 Like