Weird behavior with workflow activation and condition

Hi guys, I’m new to Bubble. I have spent last few days banging my head but having trouble to understand some of the behavior of workflow and conditions.

My understanding about workflow:

  1. A workflow has event and actions, both allow us to specify additional conditions (On When) whether an event or action should be executed.
  2. Whenever user triggers the event, say data changed, corresponding workflow will be activated. If debugger is turn on in debug mode, debugger will also be activated for stepping/troubleshooting.
  3. Once workflow is activated, event condition (if any) will be evaluated.
  4. If action condition (if any) is met, the action will be executed.

Weird behavior #1:
In below screenshot, the Input field has value, but debugger shows that event condition “value is not empty” was evaluated to negative, so the event is not fired. Shouldn’t the evaluation result be positive?

Weird behavior #2:
For optional Input field, I specify 2 event conditions in a workflow to handle negative action: (refer screenshot)

  1. This Input isn’t valid, or
  2. This Input’s value is empty

However, after added the second condition - value is empty, the workflow won’t be activated at all whenever invalid input is provided, even the debugger was not activated. This gives me impression that some unknown criteria may cause workflow to be suppressed. Shouldn’t the workflow be activated in this case? Why? In fact, I have few other scenarios in which workflow not getting activated at all, this is only one of them.

Thanks a lot.

In your first example, how are you setting the value of that input to 2021?
also if 2021 is a placeholder, this does not constitute a value and the input will be empty.

The 2021 was a real value manually typed into the field during testing.

Got it.
Why do you need the “and not empty”? In other words, why isn’t the condition “when the input’s value is changed” sufficient?

The original conditions for case 1 was “is valid and is not empty”. The first condition was removed while troubleshooting another issue hence left only “is not empty”. My use case was that, this input is optional/required depends on answer of another question in the form (in another word, “should not be empty” property can’t be used here). if the field has no input, “is valid” will still be evaluated to positive so I need the “is not empty” to catch it.

Understood. So whenever I encounter oddities like this I experiment with custom states and this usually gets it done. So my suggestion is this:

  1. Create a new custom state for the year.
  2. Then when the input’s value is changed set the custom state to the input’s value.
  3. Then have your current non-firing condition run based on the input is not empty and the custom state’s value is changed (or not empty as well).

Thanks @SerPounce for your suggestion. Based on your understanding on Bubble’s condition evaluation, should this condition be positive?

I’ve been modifying my workflow as workaround to some other behavior that’s weird to me, so the workflow becomes more complicated than it originally was. I wonder if this is common experience to Bubblers?

Yes, I do believe it should be positive, but I’m not 100% certain. and like I said, when I encounter situations like this I am usually able to get it working via workarounds through custom states.

If you are on a paid plan, I do suggest filing a bug report though. The support is usually extremely helpful if you can wait for week days.

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