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
Jon-Michael Murphey 2Jon-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())
AbhishekAbhishek (Salesforce Developers) 
Jon, I have seen some similar issues can you make it a try,

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.
 
Jon-Michael Murphey 2Jon-Michael Murphey 2
Thanks Abhishek however none of these worked for the situation im trying to solve.