function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Natasha AliNatasha Ali 

Populate date fields on multiple records using a workflow rule formula or flow?

So we have a custom object called 'Sessions' (child). Sessions are created automatically for a 'Course' (parent). Now depending on the value of the 'Level' field (on the Course) object, a different number of 'Sessions' are created.

Each of these Sessions has dates which are currently filled manually. Every single session occurs weekly (on the same day i.e every Wednesday). I need help creating a formula to calculate these date and populate them (ALL ARE DATETIME FIELD VALUES).
All dates will be populated based on the Session 1 Planned Date, here is the structure it needs to follow:

If Session Name CONTAINS 'Session 2' then populate 'Session Planned Date'Session 1 + 7
If Session Name CONTAINS 'Session 3' then populate 'Session Planned Date' Session 1 + 14
If Session Name CONTAINS 'Session 4' then populate 'Session Planned Date' = Session 1 + 21
If Session Name CONTAINS 'Session 5' then populate 'Session Planned Date'Session 1 + 28
If Session Name CONTAINS 'Session 6' then populate 'Session Planned Date'Session 1 + 35
If Session Name CONTAINS 'Session 7' then populate 'Session Planned Date'Session 1 + 42
If Session Name CONTAINS 'Session 8' then populate 'Session Planned Date'Session 1 + 49
If Session Name CONTAINS 'Session 9' then populate 'Session Planned Date'Session 1 + 56
If Session Name CONTAINS 'Session 10' then populate 'Session Planned Date'Session 1 + 63
If Session Name CONTAINS 'Session 11' then populate 'Session Planned Date'Session 1 + 70
UNTIL SESSION 80.

How would I go about doing this?

Any help is much appreciated :)
Many Thanks,
Natasha