I am trying to setup an automation that will calculate an end date. So for example we have 3 custom fields:
- start date
- end date
I want to know if there is a way to set up an automation so that if start date and duration are entered, the end date will automatically calculate.
Additionally I need to automate if start date and end date are both inout, that the duration will be calculated.
Are either of these automations possible?
Best answer by Michelle from CopperView original
@Mindre, yes this is possible! I’ve attached some examples screenshots below.
Before you try this, make sure your fields for Start Date and Duration have field keys. You can check/create them by going to Settings > Customize > Manage Fields on Records > Edit Custom Fields. These are the field keys I used for this example:
You’ll notice in the examples these field keys are written as
cf_duration. The cf_ just indicates that these are Custom Fields that you created as opposed to Default Fields.
Here is the Trigger:
Here is the Action:
I tested this workflow in my demo account and it worked great. Go ahead and give it a try and let me know how it goes!
@Michelle from Copper
Thanks for your help! For some reason it is not working for me. My start date field key = shoot_start and the shoot duration field key is shootduration.
I’m not sure what I am doing wrong. See below
@Mindre, your trigger is set to go “When a Project is Created.” Try changing it to “When a specific field is updated.”
Let me know if that fixes it!
Ha that was it, thank you
@Michelle from Copper !
Is there any way to kind of do the reverse? So if I have the shoot start date and shoot end date is there a way to automate the duration to populate? This is what I have but something must be wrong because it isn’t working:
To calculate the duration from the start and end dates, you’ll want to use the DAYS function. It takes two different dates and returns the number of days between them.
that worked! Thank you so much for all your help!