I’m having some trouble getting my “Only when” statements to work on conditional workflows. In this scenario I want this part of the workflow to run only if the Input (a date in this case) and the corresponding Thing’s field are different.
When the “Only when…” statement is present and the condition is “true” the workflow DOESN’T run. If I remove the statement it runs fine. I’ve also tried creating the statement a couple different ways without any luck.
If you haven’t done so already, I would suggest using the built-in bubble debugger to confirm that the two values you’re comparing in your condition are what you think they are.
I had a similiar issue (not comparing dates though) where “is not” did not function as intended in a workflow’s conditional statement. Replaced with “x is less than y or x is greater than y” and it worked as intended. (The forum filters out the less than, greater than symbols.)
In case you haven’t scoured the forum, dates are tricky to debug. Food for thought:
AirDate/TimePicker Milestone Award Projected’s value: formatted blah blah
Keep it exactly like you had it before. Just remove the formatted blah blah part.
After removing the :fortmatted blah blah part, verify that both items have the value you expect. Create a temporary text box that you can see that shows the value for Milestone Award and for Martial Approved just to make sure the numbers look right.
I tried your greater than idea and it worked just fine. I can only get the “is not” option to show if I just pick “parent’s group Material” and not drill down to the field I want to check.
@cdorozco16, Ok this is weird. I have two actions associated to this workflow: 1) Update the Material’s field, and 2) Create a new Activity. Both have the “Only when” condition associated to them. What’s weird is that the 1st action runs just fine, but the second action doesn’t run with the “Only when” condition. If I remove the condition then the Activity gets created. There’s something about the condition it doesn’t like which is preventing the Activity to be created.
I ran the debugger (which I’m not super familiar with) and it looks a little different between the two actions:
Make changes to a thing if field value is not Thing value.
There is little point to checking if one date/time is equal to another date/time… date/times are unique moments in time, accurate to the millisecond. Surely, you can’t be concerned with such a thing. It’s like checking for if a unique ID is equal to another unique ID. The chances of that are infinitesimal.
So, one must ask one’s self… what do I really want to know/compare?
He is not checking if two date/time values are equal. Instead he is checking if two text values of the format MM/DD/YYYY are equal, which is totally legit.
What makes me wonder is, you are changing one of the condition parameters (Parent group’s Material’s ApproveProjected) in the first step. Are you changing it to a value which should actually result in a “yes” in the second step? From what I see, this may be not the case (as you set it to AirDate/TimePicker Milestone Award’s value ?).
The difference in the propierties you marked in your latest screenshot is there because you are using two different actions. If the second action would be a “make changes to…”, there would also be a “Create if the thing doesn’t exist”.
So, I simply reversed the order of the actions and it worked! I’ve done several tests with different dates (and also using the same date) and it works like a charm.