I have a workflow that sets a date to today’s date for a set of records.
I want to create an analogous “undo” workflow which clears the date, but I haven’t been able to get a workflow to do that. Is this not currently possible?
I’ve tried setting the date to an empty value and get an error. I’ve also tried the omit function to exclude the date field, but I got an error by doing thtat as well.
I trust you are well.
I have yet to have tested this myself but potentially setting the field to false might work.
IE - record.values.myDate ?? false : true OR potentially using Nil as described in the forum link
@katrinyordanova, undefined is not a built-in variable. As mentioned above, I’ve tried setting it to false , "" , 0 , and nil none of which worked. The way I set it to nil was by defining a variable without setting its value.
I think the solution suggested by @shmuel is a little neater than creating another field that is empty … the workflow expression would simply have a variable name (e.g. blankDate) with no value, and then that variable with no value is posted to the date field you want to clear.
Hi everyone,
That is true ! It didn’t work the first time but now it works like a charm !
I had to define variable called empty (type: any) = (an empty field) and set column.value (type:any) = empty
When I changed from any to datetime I had an error.
I am having a weird consequence when I updated to 2023.9.1 :
When I empty the dates, they appears like “01-01-0001”. Did anyone of you guys experience this ?
@KOAMSK Hey, from which version to which version did you upgrade?
Any other things that changed?
Also what database are you using? Any other relevant data is useful aswell.
Hey !
It is the version 2023.9.1 and the update was from version 2023.3.2 (I’m not sure about the subversion).
Here is the export of a simple module and a workflow to replicate the error empty date 2023.9.zip (1.7 KB)