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
sidsid 

Over-write date formula

I have created a formula to calaculate a date field.   (CreatedDate +30)  which yields a date 30 days from today.  There are case when I would like to overwrite the results of this formula and type in a differenct date.

How can I overwrite the formula?   Is the another way?

Thanks

 

Jake GmerekJake Gmerek

Formula fields are read only.  However, you can do a form of overwrite with an additional field.  For example say you create overwrite__c as a field on your object.

 

Change your formual to:

 

if (isnull(overwrite__c), CreatedDate + 30, overwrite__c)

 

This will give you 30 days out in the formula field, but if someone enters a value in overwrite__c it will output that instead.