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
LJHOWELJHOWE 

Formula to populate picklist based on date field

I want to have my picklist automatically select based on the number of days past a custom date field.  For instance if the Custom Date field is 4/1/07 for the first 30 days I want the picklist to read: "pre-appointment to 30 days; 31 days after the custom date field I want the picklist to read: "30 to 60 Days.  I tried a field update, but that didn't work I used Date equals Next 30 Days, etc.  So I thought a regular formula field would work better for the picklist.
 
Could someone please help me.  Thanks!
Phil_RPhil_R
Hi LJHowe,
it is possible to do this using custom S-Controls, however this is required quite a bit of coding for such a small task.
You can however create a custom formula field that will, based on the date for your chosen field output, "pre-appointment to 30 days", and after the 30day period output "30 to 60 Days".
This may be achieved with the following formula.
 
IF(CUSTOM_DATEFIELD__c < (TODAY() +30),"pre-appointment to 30 days","30 to 60 Days")
 
The above formula should work if you relace CUSTOM_DATEFILED__c with your chosen datefield.
 
If there are particular issues you would like to address, please feel free to contact me.
My details are below.
 
Kind regards,
 
Phil
 
Philipp Rackwitz
Sofia Works
Salesforce.com Consulting Partner
 
Tel: 0207 556 7053