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.
- Sets the input box custom state “Editmode” to “yes” (This enables the input box, changes the background color and adds a border)
- Animates the input box
- Sets focus to input box
- Hides the edit button
- Shows the Save and Cancel button group
- Makes changes to database based off of the values entered into the input box
- 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)
- Hides the Save and Cancel button Group
- Shows the Edit button
- Sets the input box custom state “Initial State” to “yes”. (Reverts the input box to no background, no border, and set to disabled)
- Sets the input box custom state “Initial State” to “yes”
- Resets the group
- Hides the Save and Cancel button group
- 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.
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. Hope that helps!
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
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.