Terminate Workflow Not Working

I have a workflow that works like this:

User clicks the submit button,

Step 1: Show an error message if an ID does not exist (only when Search for Associates:count is 0)
Step 2: Terminate this workflow only if Search for Associates:count is 0
Steps 3 - 5 should be executed if the first two conditions aren’t met.

Problem is the workflow keeps running even though I have the terminate workflow step in there. It creates a blank entry into the database and sends the user to the success page even after loading the error message.

What is going on? What am I doing wrong?

Unfortunately Bubble sometimes doesn’t respect the workflow order :neutral_face:. It is a known problem. It could be what is happening…

Did you already checked the debug panel to see if the :count is really 0 ??

Admittedly I’m not real familiar with the debugger. I poked around with it, and all I’m seeing is a bunch of styling information. But I’m assuming it comes back as 0 because the error message pops up when I enter an ID number that doesn’t exist. Then there’s no error message when the ID matches.

Hi there, @bryan.beneker… if you share some screenshots of your workflow steps, I’m sure someone will be able to help you get this one sorted out. That being said, one thing does come to mind based on Rafael’s comment about workflow order. Maybe try changing the condition on step 2 (the terminate step) to run the step only when the result of step 1 is not empty. Then, put conditions on steps 3-5 to run those steps only when the result of step 2 (or maybe even step 1) is empty.

Hope this helps.


Hi @mikeloc ! I tried changing the condition to Result of Step 1 is not empty, but Bubble does not allow me to put in Result of Step 1 as an option.

Below are my screen shots.





I’ve found that adding a pause before terminating workflow fixes it.

Hi @sivercreeper101 , unfortunately that didn’t fix the problem. :frowning:

I have it running for the default 1000 milliseconds. Need to be longer or shorter?

@rpetribu Sorry, I’m new to Bubble. I stumbled across how to run the debugger. Looks like maybe it doesn’t actually come back as count being 0? I’m assuming green is true and red is false. If that is the case, then it’s odd that step 1 (error message) is green but step 2 (terminate workflow) is red.

@bryan.beneker An alternative (and much safer approach IMHO) is to use the conditions on the event instead of the actions inside. Just copy and the paste the event, add conditions on them (1st: count =0, 2nd: count>0), and assign actions accordingly. This way you get to bypass the Terminate workflow thing and the app remains more reliable. The only downside is an additional event in the Workflow tab :grin:
Check the demo in the video below:

1 Like

Hi @deejay.shani , Thank you for the video and direction. Unfortunately this didn’t work. I’m guessing it’s a problem with the count argument. The workflow goes no matter what after I changed the conditionals to the event. Below are my screen shots.

Is there another way to say, “If the input box value matches an entry in the Associates data type, then execute this workflow” and “If the input box value does not match an entry in the Associates data type, then execute this workflow?”

I also tried changing the condition to something like this: Input Employee ID’s value is Search for Associatess:first item’s Associate ID

This displays the error message and stops the workflow from running. But it stops everything from running even when the condition is true (input value = data type entry).

So if I understand correctly, you are still getting the error msg and the entry created as well? Did you remove the conditions from the actions themselves? If so then I’m not exactly sure what the problem is.
You can also try using “Search for Associates:count>0” and “Search for Associates:count<1” as conditions. Also, I would suggest to close the editor and reopen it. And make sure that same app is not open in two editors, I recently got weird results for that reason :slight_smile:

***“Search for Associates:count>0” and “Search for Associates:count<1”

Nope, the count arguments just allow the workflow to go through without any error message or anything. I’ve created a video as that’s probably easier to track: Terminate Problem

I also just tried your updated conditionals, and it does the same thing as what I show in the video. I also tried logging out, closing the browser, and jumping back in. No difference.

The one thing you don’t show in the video and haven’t shown in any of the screenshots is the constraint on the search for associates. What is that constraint? Also, just a thought… do you have any privacy rules on the Associates data type?

1 Like

I think then it’s a Bug. You should report it to the Bubble team :slight_smile: Also, as @mikeloc said, make sure the search constraints in the conditions match.

@mikeloc My apologies. Yes, I have one constraint and that is on the Create new CheckpointLog step. Otherwise, there are no constraints.

@deejay.shani OK, so to make them match, just for example… for the show error message step… would I be right in putting only when Search for Associates:first item’s Associate ID is not Input Employee ID’s value? Would that be the match you’re talking about?

I meant the searches on the workflow events, not the create action, but I assume they have the same constraint as that action. Also, you made sure it’s not a privacy rules problem, right?


@mikeloc Adding the constraints to the workflow events rather than the actions did the trick! Now it functions properly (wrong ID gives an error message and the correct ID passes through to the success page). Thank you both so much for your help this afternoon!

Only problem I have left is this is not pushing through all data to the Checkpoint Log data type. It only pushes through the associate’s name. It should include their company name, their type, and the current date and time. But I will work on that to see if I can get that figured out.

Again, @deejay.shani and @mikeloc , thank you so much!


You can add more data to send through to the database by adding it using the “+Set another Field” button :slight_smile:

1 Like