What am I doing wrong?

I want this Rule to set “Start Date” (which is working), and then set “Due Date” to be 7 days later, but “Due Date” is always empty after this Rule runs:

The update action will update all fields simultaneously, so when [Step 1 Task].[Start Date] is used to update the Due Date, it will be whatever the Start Date value was before this action occurred.

1 Like

I suggest using the same formula used for Start Date but add 7 days to it.

UPDATE: see below, splitting into two actions will solve this

Apparently it’s worse than that…
It appears that additionally, the results of “very recently run” Rules (i.e., those triggered “at the same time”) are also unavailable :slightly_frowning_face:

This is making it very difficult to do the following via no-code:

  1. Create a Button for the “Page” DB that creates and links five “Task” entities.
  2. Use a “Task” Rule to set the Start Date of each newly-created Task to the “most recently created Task’s” Due Date, plus 7 days (that bit is always empty).

I’m trying to get the dates of these Task staggered – so each Task’s Start Date references the previously-created task’s Due Date, something like:

[Step 1 Task].Page.Tasks.Sort([Creation Date], false).First().[Due Date] + Days(1)

But it appears that the “previously created” Task actually hasn’t been created yet when the Rule runs :slightly_frowning_face:

Maybe we could get a new Action for “Execute/commit previous Actions before continuing”?

Based on what you describe, I wonder why you aren’t defining the Start and Due dates of the five Tasks at the time they are created (in the Page automation)?
It would seem that there is complete determinisim, such that the values can each be calculated up front.

I would have rather done it the more compact way (one Rule instead of five set-field Actions), but it looks like it’s either your way or a script.

I don’t understand - doesn’t the way you have described above require two automations (a button and a rule)?
I don’t know how your button is written, but I assumed it had 5 ‘create task’ actions anyway :thinking:

Short explanation is, I was wanting to decouple the date-setting from the task creation, for other reasons - basically thinking ahead about wanting to do more date-fiddling on these tasks from other contexts as well. It’s minor, though.

Plus it irks my aesthetic sense to be duplicating formulas :joy:

What does your first button automation look like?

The Button is pretty simple –

The “Dependent On” formulas each reference the Task created by the previous Action:

[Step 1 Page].Tasks.Filter(Name = "WRITE " + [Step 1 Page].Name).Sort().First()

Assuming that you want each of these 4? 5? tasks to follow after each other (with Start Date 1 day after the previous Task’s Due Date, and Due Date 7 days after that), I don’t know why you would use this formula:

Wouldn’t it be better to use something like this?:

[Step 1 Task].Page.Tasks.Sort([Due Date]).Last().[Due Date] + Days(1)

Each of the Tasks will be created in order, and therefore a rule that looked like this should work:

Note: by splitting into two actions, the Start Date is available to be read when being used to define the Due Date.

(and you might need to have an if…then condition for defining the Start Date of the first Task to be created)

1 Like