Can only run a workflow once


I am new to this program so I am still learning a good amount. Recently I ran into a problem where I can run the workflow of a button once correctly. After the actions have taken place, the button workflow does not complete all the steps if it is pressed again.

I am trying to make a simple budget application for personal use, nothing extreme. The page has a label, input box, and 3 buttons.

Button functions

Edit button:

  1. Sets the input box custom state “Editmode” to “yes” (This enables the input box, changes the background color and adds a border)
  2. Animates the input box
  3. Sets focus to input box
  4. Hides the edit button
  5. Shows the Save and Cancel button group

Save button:

  1. Makes changes to database based off of the values entered into the input box
  2. Resets the group (I put the label and the input box into a group as this was the only way I could figure out how to reset the value of the input box. On reset, the input label grabs the new value from step 1)
  3. Hides the Save and Cancel button Group
  4. Shows the Edit button
  5. Sets the input box custom state “Initial State” to “yes”. (Reverts the input box to no background, no border, and set to disabled)

Cancel button:

  1. Sets the input box custom state “Initial State” to “yes”
  2. Resets the group
  3. Hides the Save and Cancel button group
  4. Shows the Edit button

Picture of input box Conditional :

When I press the edit button, everything works fine both save and cancel. But after I save or cancel, when I press the edit button again Step 1does not work, thus not enabling the input box.

Initial Startup:

Edit button is pressed:

Cancel is pressed, then edit again:

As you can see the edit button will hide itself and show the save and cancel buttons but does not activate the input box.

All help is appreciated, Thanks.


Welcome to Bubble Travis!

Have you run these workflows in debug mode? Simply add the following to the end of the url:

This will give you the ability to see what Bubble calculates for each action in the workflow so you can see what’s being calculated differently than you intend. I find this to be the single most effective way to figure out why something isn’t behaving the way I want in Bubble.

Also, don’t forget you can choose in a workflow to run “Only Once” or “Every Time”. I have forgotten to select that before and had the same problem. :blush: Hope that helps! :slight_smile:

Check the top workflow. You probably have, when this state is true do this “only one”.

Thanks for the response, I ran the application in debug mode. It shows the same values as it does when the function works. The only way for the workflow to work properly again is if I reload the page.

Hi, I do not see an option showing where to only run a workflow once.

There’s an option to run one at a time. I think that’s what he’s referring to.

After looking a bit more at your screenshots, I wonder if it’s not selecting the input because the value is being displayed (as test?) and not as an input? (Just a guess at what might be going wrong)

I suspect something is different the 2nd time workflow is run and that’s why there’s a problem. If using debug_mode doesn’t work (and often times it just requires going through it very thoroughly, which isn’t fun but it works) then I’d recommend implementing small pieces of the same logic on a separate page and seeing if you can rerun the workflows with the simplest set of logic. If that works, then add a bit more of the logic and try again. This will help you narrow scope for where the problem resides.

This is what I was talking about :slight_smile:

I figured it out! I was using two different States to define what the input box should do. When I used the same State for both actions and set one of the buttons to negate the state, I was able to switch between the states without having to refresh.

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