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
Wil PhoWil Pho 

How do I populate a date value?

Hi there, 

I have a Contract custom object that has a Status picklist field with Approved and Rejected as options; there is another date field called  Approved Date. I want the Approved Date to populate the current date when Approved is selected. However, there are existing Contract records that should be excluded from this formula. Currently, the formula is as follow:

IF(ISPICKVAL(Status__c,"Approved"),TODAY(), null) 

I know how to create a Flow or PB to do this, but that seems like overkill. 

Is there a formula that would work? Perhaps IsNew() or PRIORVALUE function?

Thanks in advance for the help.

Wil
 
VinayVinay (Salesforce Developers) 
Hi Wil,

Not sure if formula field you can try using simple workflow to update date field with today whenever it is approved.  

Thanks,
Wil PhoWil Pho
Thanks, Vinay! I used a Flow to update the field instead. 

Wil