Forum Academy Marketplace Showcase Pricing Features

Using conditional logic for date field

I have a thing with a date field called start-date-FLC it just holds a date & time.

This appears to be how you can set a date field, directly.

I wanted to conditionally set the date, i.e. test if it empty and the use formatted text (as boolean test logic and then enter current date +/- days as needed)

Perhaps I have been staring at this too long, every option I am trying seems to end in error, it seems cumbersome to create only when for each of the two or more options. I have a nested logic which is 3 deep. Date is now, if X is empty, else Y if Y is empty, else Z etc … This work perfectly fine for number fields.

I think the issue might be that :formatted as text basically converts the date to a text, and so you’re trying to assign a text string to a date field. You’d have to convert the date string back to an actual date.

That said, there’s likely a better way to go about it without the conversion.

Could that be done using conditions in “Only when”?

I have tried that option but was trying to avoid as it means I end up multiple blocks and I have dozens f=of flows where I need to do that same. Look slike I maybe buggered on this point, thank you so much for your advice.

Seems like there should be a way using custom states and/or custom events to reduce or eliminate repetition. I don’t have a good sense of the “big picture” for your workflows, so I can’t provide much detail; but that’s what I’d suggest as a general approach.

Learn about dates:

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