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
hogehogehogehoge 

Error Help me!

I got the following error in process builder:

Invalid formula: syntax error. missing '='
how can i fix it
CASE(1,

  IF(AND(DAY([Opportunity].CloseDate)>= 1,DAY([Opportunity]].CloseDate)<= 7),1,2),”1Weeks”,

  IF(AND(DAY([Opportunity]].CloseDate)>= 8,DAY([Opportunity]].CloseDate)<= 14),1,2),”2Weeks”,

  IF(AND(DAY([Opportunity]].CloseDate)>= 15,DAY([Opportunity]].CloseDate)<= 21),1,2),”3Weeks”,

  IF(AND(DAY([Opportunity]].CloseDate)>= 22,DAY([Opportunity]].CloseDate)<= 28),1,2),”4Weeks”,

  “5Weeks”

)

 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi ,

 There is extra ] in every line and removed it now. Can you check now.
 
CASE(1,

  IF(AND(DAY([Opportunity].CloseDate)>= 1,DAY([Opportunity].CloseDate)<= 7),1,2),”1Weeks”,

  IF(AND(DAY([Opportunity].CloseDate)>= 8,DAY([Opportunity].CloseDate)<= 14),1,2),”2Weeks”,

  IF(AND(DAY([Opportunity].CloseDate)>= 15,DAY([Opportunity].CloseDate)<= 21),1,2),”3Weeks”,

  IF(AND(DAY([Opportunity].CloseDate)>= 22,DAY([Opportunity].CloseDate)<= 28),1,2),”4Weeks”,

  “5Weeks”

)

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

 
hogehogehogehoge
I did the above but got an error message
⇒Invalid formula: syntax error
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Can you try below " is not in correct format.
 
CASE(1,

  IF(AND(DAY([Opportunity].CloseDate)>= 1,DAY([Opportunity].CloseDate)<= 7),1,2),"1Weeks",

  IF(AND(DAY([Opportunity].CloseDate)>= 8,DAY([Opportunity].CloseDate)<= 14),1,2),"2Weeks",

  IF(AND(DAY([Opportunity].CloseDate)>= 15,DAY([Opportunity].CloseDate)<= 21),1,2),"3Weeks",

  IF(AND(DAY([Opportunity].CloseDate)>= 22,DAY([Opportunity].CloseDate)<= 28),1,2),"4Weeks",

  "5Weeks"

)

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Did the formula worked and error were resolved? I hope you are using this formula other than opportunity object .

Let me know more information if this is not resolved.



Thanks,