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
Stephen Glaros 7Stephen Glaros 7 

Error with multiple IF/OR formula

Hello,
I'm trying to write a formula that will result in one of three calculations on a date:
  • if the orignial start date and CO (Change Order) license term months fields are populated, then ADDMONTHS to orignial start date, otherwise null; or
  • If the CO start date and original license term months fields are populated, then ADDMONTHS to the CO start date, otherwise null; or
  • If the CO start date and CO license term months are populated, then ADDMONTHS to the CO start date, otherwise null.
Basically I'm hoping that one of the three scenarios will populate a field with an updated date. I'm getting an error with the following formula that I'm using the incorrect parameter type for or(), expected boolean, recevied date. I've been working on this for a few days and just can't seem to figure out what I'm doing wrong; any feedback would be appreciated. Thank you!
IF ( ISBLANK( CO_Start_Date__c ) 
|| ISBLANK( Original_License_Term_Months__c ) , NULL,
 ADDMONTHS(CO_Start_Date__c, Original_License_Term_Months__c)),

IF ( ISBLANK( Original_Start_Date__c ) 
|| ISBLANK( CO_License_Term_Months__c ) , NULL,
 ADDMONTHS(Original_Start_Date__c, CO_License_Term_Months__c)),

IF ( ISBLANK( CO_Start_Date__c ) 
|| ISBLANK( CO_License_Term_Months__c ) , NULL,
 ADDMONTHS(CO_Start_Date__c, CO_License_Term_Months__c))

 
Best Answer chosen by Stephen Glaros 7
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you confirm where you are writing the formula. Is it on single formula field which will not work .

As there is high chnace of satisfying all the three conditions so in single formula that may not be possible. 

Thanks,
 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you confirm where you are writing the formula. Is it on single formula field which will not work .

As there is high chnace of satisfying all the three conditions so in single formula that may not be possible. 

Thanks,
 
This was selected as the best answer
Stephen Glaros 7Stephen Glaros 7
Hi Sai, Thanks for the response - yes, I’m trying to write this formula so it applies to one formula field. I really appreciate the feedback and confirms what I’ve been thinking. I should have looked at this earlier, but I’m going to investigate whether I can achieve this via Flows. Again, thank you for taking the time to respond. Best regards, Stephen
alo vinalo vin
Pets become part of our life. Want to know how to maintain pets here you can check CatsBuz for more details. https://catsbuz.com
baleso kevinbaleso kevin
Good post, Here we will provide you with interesting content, which you will like very much 
Henry Ford MyChart Login (https://henry-ford-mychart.info/" target="_blank)
etery ryrtyetery ryrty

I noticed your post about the error with multiple IF/OR formulas, and it's a common issue that many face. When troubleshooting such problems, it's essential to be as precise as lums fee structure (https://admissionarena.com/) in your formula criteria. This can help ensure accurate results and minimize errors. Good luck with your Excel endeavors!