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
Courtney MosleyCourtney Mosley 

Formula Isn't working correctly.

Hello,
Can someone please assist me with my formula? I am attempting to write. "If Field X = Y and Field A = B, then field C must be greater than 1 character". My formula is as follows:
AND(ISPICKVAL( StageName, "Closed Lost")ISPICKVAL( Type__c, "Cancellation Outreach"),LEN(Loss_Reason_Extended__c)>1)

I am getting a syntax error that staes that I am missing ')' 
Can I please get some assistance on what I'm doing wrong?
Andrew GAndrew G
Hi Courtney

Try
AND(
  ISPICKVAL( StageName, "Closed Lost"), 
  ISPICKVAL( Type__c, "Cancellation Outreach"),
  LEN(Loss_Reason_Extended__c) > 1
  )

you missed a comma in the formula supplied.
I find formating the formula sometimes helps expose issues / count brackets etc.

Regards
Andrew
 
Andrew GAndrew G
mmm.. thinking if this is a validation formula?  then minor tweak:
AND(
  ISPICKVAL( StageName, "Closed Lost"), 
  ISPICKVAL( Type__c, "Cancellation Outreach"),
  LEN(Loss_Reason_Extended__c) < 2
  )
Courtney MosleyCourtney Mosley
I failed to come back and thank you for your help! The issue was a missing comma. I appreicate all your help!