Skip to main content
Leah Ferch 님이 #Data Management에 질문했습니다
I have a picklist:(Cycle__c and would like to automatically populate a different field Site_Visit_Due_Date__c based on the values selected from the picklist and another date field.

 

Picklist: Cycle__c options are:

 

1

 

2

 

3

 

I would like the Site_Visit_Due_Date__c field to calculate the new date based on which picklist above is chosen and the Site_Visit_Date__c field:

 

If "1" is chosen, I would like the Site_Visit_Due_Date__c field to calcluate the field Site_Visit_Date__c date + 365 days(or 1 year); If "2" is chosen, I would like the Site_Visit_Due_Date__c field to calcluate the field Site_Visit_Date__c date + 728 days(or 2 years); and if If "3" is chosen, I would like the Site_Visit_Due_Date__c field to calcluatethe field Site_Visit_Date__c date + 1088 (or 3 years).

 

EXAMPLE:  

 

Site_Visit_Date__c : 4/17/2017

 

Cycle__c Picklist chosen : 2

 

Site_Visit_Due_Date__c should calculate to: 4/17/2019

 

I hope this makes sense.
답변 13개
  1. 2017년 4월 18일 오후 2:00

    +1 Sunil, you could always make the formula to be more flexible by using this:

    Site_Visit_Date__c +

    VALUE(TEXT(Cycle__c)) * 365

     

    This way if you ever add more picklist values to the Cycle__c picklist like 4,5,6, the formula will automatically calculate the Site_Visit_Date__c and the formula won't have to be changed to accommodate the new picklist additions.
0/9000