You need to sign in to do that
Don't have an account?
Jon-Michael Murphey 2
Im have two picklist fields Action_Frequency__c and Frequency_selection__c, Action freq is a list showing weekly, monthly, quarterly, biannually and annually. Freq Selection is the broken out by the day of the week, the num day of the month or the month.
Im have two picklist fields Action_Frequency__c and Frequency_selection__c, Action freq is a list showing weekly, monthly, quarterly, biannually and annually. Freq Selection is the broken out by the day of the week, the num day of the month or the month. Ive created two formula fields Dow__c which is turning the text day from Freq selection to a number value, and Dom__c which takes the month text to a number value. Im needing a formula that will create a due date based on the two picklist values. here is my formula so far:
CASE(Action_Frequency__c,
"Weekly",DATE(MONTH(DATEVALUE(CreatedDate)),Day(DATEVALUE(Text(DOW__c))),YEAR(DATEVALUE(CreatedDate))),
"Monthly",DATE(MONTH(DATEVALUE(CreatedDate)),Day(DATEVALUE(Text(DOW__c))),YEAR(DATEVALUE(CreatedDate))),
"Quarterly",DATE(CEILING(MONTH(DATEVALUE(Text(DOM__c))))/3,DAY(DATEVALUE(CreatedDate)),YEAR(DATEVALUE(CreatedDate))),
"Bi-Annually",DATE(CEILING(MONTH(DATEVALUE(Text(DOM__c))))/6,DAY(DATEVALUE(CreatedDate)),YEAR(DATEVALUE(CreatedDate))),
"Annually",DATE(CEILING(MONTH(DATEVALUE(Text(DOM__c)))),DAY(DATEVALUE(CreatedDate)),YEAR(DATEVALUE(CreatedDate)))+1, TODAY())
CASE(Action_Frequency__c,
"Weekly",DATE(MONTH(DATEVALUE(CreatedDate)),Day(DATEVALUE(Text(DOW__c))),YEAR(DATEVALUE(CreatedDate))),
"Monthly",DATE(MONTH(DATEVALUE(CreatedDate)),Day(DATEVALUE(Text(DOW__c))),YEAR(DATEVALUE(CreatedDate))),
"Quarterly",DATE(CEILING(MONTH(DATEVALUE(Text(DOM__c))))/3,DAY(DATEVALUE(CreatedDate)),YEAR(DATEVALUE(CreatedDate))),
"Bi-Annually",DATE(CEILING(MONTH(DATEVALUE(Text(DOM__c))))/6,DAY(DATEVALUE(CreatedDate)),YEAR(DATEVALUE(CreatedDate))),
"Annually",DATE(CEILING(MONTH(DATEVALUE(Text(DOM__c)))),DAY(DATEVALUE(CreatedDate)),YEAR(DATEVALUE(CreatedDate)))+1, TODAY())
https://developer.salesforce.com/forums/?id=9060G000000XfkVQAS
https://trailblazers.salesforce.com/answers?id=90630000000h0bpAAA
https://salesforce.stackexchange.com/questions/46718/how-to-write-formula-based-on-pick-list-value-of-the-pick-list-field
https://developer.salesforce.com/forums/?id=9060G000000I7wVQAS
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Thanks.