+ Start a Discussion
West415West415 

Populate field with number of days open?

Hi,

 

I have a custom field on a custom object called "Days Job Open".  I want to know how to populate this field via a workflow and specifically what criteria would I need.  I know what I want to do, but not quite sure of the steps needed to make it happen.   


The logic is that whenever a job is posted I want to populate this field with the value equal to the number of days the job has been open.    All jobs have a "published date" and an "end date" so I want to subtract and get the difference and that will be my value I want to put in my "Days Job Open" column.

 

How can I do this?

 

 

Nithya@metasts.comNithya@metasts.com

Hi,

 

     You can directly use the formula field below, or you can use the formula criteria in Workflow to implement your scenario.

Use the Formula and let me know, if u have any doubts.

  

       

IF( ISBLANK( Close_Date__c ),
TODAY() - Open_Date__c ,
Close_Date__c - Open_Date__c )

 

Regars,

Nithya Kalyani. C/Salesforce Developer