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
Jennifer.SchnellJennifer.Schnell 

Error: Syntax error. Missing '=' for formula

I am receiving a syntax error for this formula I am building for a node in a PB, I have reviewed this many times and I don't see where I am missing a = sign.  The basic logic is - IF record ISNEW or ISCHANGED AND "Industry" = "This" AND "Country" = "THIS.  I am a little dyslexic and formulas are my weak spot, I tend to get the syntax backwards.

Error: Syntax error. Missing '='
OR (
	AND ( ISNEW (),
	OR (
        TEXT ( [Account].Industry ) = "Chemicals",
        TEXT ( [Account].Industry ) = "Life Sciences",
        TEXT ( [Account].Industry ) = "Automotive",
        )
    AND (
         TEXT ( [Account].Country__c ) = "Germany",
         TEXT ( [Account].Country__c ) = "Austria",
         TEXT ( [Account].Country__c ) = "Switzerland",
         TEXT ( [Account].Country__c ) = "Luxembourg",
         TEXT ( [Account].Country__c ) = "Liechtenstein")
         ),
		
	OR (
    ISCHANGED ( [Account].Owner.id ),
	    AND  ( [Account].Owner.Id ) = "0050f000009WCRoAAO",
        TEXT ( [Account].Country__c ) = "Germany",
        TEXT ( [Account].Country__c ) = "Austria",
        TEXT ( [Account].Country__c ) = "Switzerland",
        TEXT ( [Account].Country__c ) = "Luxembourg",
        TEXT ( [Account].Country__c ) = "Liechtenstein")
    )

 
Best Answer chosen by Jennifer.Schnell
Alain CabonAlain Cabon
Hello Jennifer,

Long lists of picklist values make the formula  unreadable (very difficult to reveal the errors .. without being dyslexic).
We all face a similar problem.

Using CONTAINS makes that easier. 
OR (
  AND ( ISNEW (),
        CONTAINS( "Chemicals|Life Sciences|Automotive",     TEXT ( [Account].Industry )),
        CONTAINS( "Germany|Austria|Switzerland|Luxembourg", TEXT ( [Account].Country__c  ))
  ),
  AND ( ISCHANGED ( [Account].Owner.id ),
        [Account].Owner.Id = "0050f000009WCRoAAO",
        CONTAINS( "Germany|Austria|Switzerland|Luxembourg", TEXT ( [Account].Country__c  ))
  )
)

You have now just two main alternatives ( OR ) with their series of conditions ( AND ).

All Answers

Manj_SFDCManj_SFDC
Hello put a comma at line 7 after parenthesis 
Raj VakatiRaj Vakati
OR(
AND (
ISNEW(),
OR (
        TEXT(Industry) = "Chemicals",
        TEXT(Industry) = "Life Sciences",
        TEXT(Industry) = "Automotive"
 
)
),
    AND (
         TEXT ( Country__c ) = "Germany",
         TEXT ( Country__c ) = "Austria",
         TEXT ( Country__c ) = "Switzerland",
         TEXT ( Country__c ) = "Luxembourg",
         TEXT ( Country__c ) = "Liechtenstein"
         ),
OR (
    ISCHANGED (OwnerId),
	    AND  ( 
		Owner.Id  = "0050f000009WCRoAAO",
        TEXT ( Country__c ) = "Germany",
        TEXT ( Country__c ) = "Austria",
        TEXT ( Country__c ) = "Switzerland",
        TEXT ( Country__c ) = "Luxembourg",
        TEXT ( Country__c ) = "Liechtenstein")
		)
    


)

 
Alain CabonAlain Cabon
Hello Jennifer,

Long lists of picklist values make the formula  unreadable (very difficult to reveal the errors .. without being dyslexic).
We all face a similar problem.

Using CONTAINS makes that easier. 
OR (
  AND ( ISNEW (),
        CONTAINS( "Chemicals|Life Sciences|Automotive",     TEXT ( [Account].Industry )),
        CONTAINS( "Germany|Austria|Switzerland|Luxembourg", TEXT ( [Account].Country__c  ))
  ),
  AND ( ISCHANGED ( [Account].Owner.id ),
        [Account].Owner.Id = "0050f000009WCRoAAO",
        CONTAINS( "Germany|Austria|Switzerland|Luxembourg", TEXT ( [Account].Country__c  ))
  )
)

You have now just two main alternatives ( OR ) with their series of conditions ( AND ).
This was selected as the best answer