Possible Bug in Alerts

Hi All,

I’ve got an app that pilots are using to log flights. I’ve set it up to display an alert if they enter a fllght that conflicts with another flight. The criteria for determining conflict is twofold: A) if the aircraft ID is the same, AND b) if the takeoff and landing time-date is equal to or overlaps with a previously submitted flight. It uses the same criteria to either allow creation of a new flight leg record or to prevent creation of a new flight leg record.

The app displays the warning sometimes when there is no conflict and is displaying incosistently. For instance I submitted a flight in March of 2017 yesterday when all the other flight records are in June and July. It always creates or prevents the new flight leg correctly, it’s just the warning alert that is inconsistent. The logic is exactly the same. I’m wondering if somehow it is creating the flight record before it tests for warning even though the workflow has the warning alert test first.

Here’s an image of the workflow:

Has anyone seen this or devised a fix?

I think you should change your workflow sequence so that you can ensure the check is done first before the new leg is created - even if it’s creating/not creating properly, Bubble is most likely triggering it simultaneously before it has had a chance to take the new leg into account. In general, Bubble tries to do this as much as possible for actions that don’t depend on the result of a previous step. It’s not super obvious, but the order of actions you see in your workflow isn’t necessarily the order they’ll get triggered.

What I’d do is have 2 “Submit Flight Leg” actions. One that only displays the alert and one that does everything else. You can use the conditions you have in the actions and move them to the event instead. That way only one of those events will ever be true and you won’t have things misfiring.

Gaby | Coaching Bubble

Thanks, that makes sense.

In terms of a fix, how would I make those two different workflows? Do I have to use two separate buttons (user actions)? I’d rather not make the users take action to test AND submit.

Is there a way to trigger that off of the same user action? I.E. pushing the “submit flight leg button” once?

Copy and paste your current event and remove actions that don’t belong under each event condition. You’ll have 2 events with the same trigger (when button submit flight leg is clicked) - it’s just that only one will ever run at one time because they’ll have opposite conditions.


Thanks! What seems to have worked is:

  1. to separate the actions to different events as you suggested, as well as
  2. moving the condition up to the event rather than testing for it in the action.

The work around is good, but the bubble interface leads one to believe that the actions are sequential, by calling them “step 1,” “step2,” and so on maybe a better label would be “randomly sequenced action 1,” etc. I’d still say this should go in the backlog for bubble to fix. An easy MVP would be just to put a note on the interface that explains that the “steps” may not necessarily be sequential.

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