Ask Search:
Geena Nohinek LepkeGeena Nohinek Lepke 

Formula - Error: Syntax error. Missing '='

Can someone tell me what is wrong with this formula and where I need to put the missing =

IF(AND(TEXT([Opportunity_Volume__c].RecordType.Name, "Commercial"), 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c  >= 1), 
 
CASE( [Opportunity_Volume__c].User_Unit_of_Measure__c, 
"KBD", [Opportunity_Volume__c].Volume__c  * 
([Opportunity_Volume__c].Duration_Value_Hidden__c / [Opportunity_Volume__c].DaysYear__c), 
"Lt", (0.00000629*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"M3", (0.006290*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MGY", [Opportunity_Volume__c].Volume__c * 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c *
0.0652/[Opportunity_Volume__c].[Opportunity_Volume__c].DaysYear__c, 
"ML", (6.28930817610063*[Opportunity_Volume__c].Volume__c )/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MT", ([Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  
* [Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"ST", ([Opportunity_Volume__c].Volume__c *0.00551)/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Gallons",([Opportunity_Volume__c].Volume__c /(42000* 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c )), 
"KT", ([Opportunity_Volume__c].Volume__c  * [Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) /  
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Tonne", (([Opportunity_Volume__c].Volume__c  * [Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) 
/ [Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c ) / 1000, 
1))​​​​​​
Best Answer chosen by Geena Nohinek Lepke
Steve MolisSteve Molis
Oaky I think I found it

[Opportunity_Volume__c].[Opportunity_Volume__c].DaysYear__c


Try this
IF(
AND(
TEXT([Opportunity_Volume__c].RecordType.Name) = "Commercial", 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c  >= 1
), 
CASE( [Opportunity_Volume__c].User_Unit_of_Measure__c, 
"KBD", 
[Opportunity_Volume__c].Volume__c  * 
([Opportunity_Volume__c].Duration_Value_Hidden__c / [Opportunity_Volume__c].DaysYear__c), 
"Lt", 
(0.00000629*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"M3", 
(0.006290*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MGY", 
[Opportunity_Volume__c].Volume__c * 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c *
0.0652 / [Opportunity_Volume__c].DaysYear__c, 
"ML", 
(6.28930817610063*[Opportunity_Volume__c].Volume__c )/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MT", 
([Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  
* [Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"ST", 
([Opportunity_Volume__c].Volume__c *0.00551)/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Gallons",
([Opportunity_Volume__c].Volume__c /(42000* 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c )), 
"KT", 
([Opportunity_Volume__c].Volume__c  *  
[Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) /  
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Tonne", 
(
(
[Opportunity_Volume__c].Volume__c  * [Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c ) / 1000, 
1), 
NULL)​​​​​​

 

All Answers

Steve MolisSteve Molis
Try this
IF(
AND(
TEXT([Opportunity_Volume__c].RecordType.Name) = "Commercial", 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c  >= 1
), 
CASE( [Opportunity_Volume__c].User_Unit_of_Measure__c, 
"KBD", 
[Opportunity_Volume__c].Volume__c  * 
([Opportunity_Volume__c].Duration_Value_Hidden__c / [Opportunity_Volume__c].DaysYear__c), 
"Lt", 
(0.00000629*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"M3", 
(0.006290*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MGY", 
[Opportunity_Volume__c].Volume__c * 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c *
0.0652/[Opportunity_Volume__c].[Opportunity_Volume__c].DaysYear__c, 
"ML", 
(6.28930817610063*[Opportunity_Volume__c].Volume__c )/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MT", 
([Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  
* [Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"ST", 
([Opportunity_Volume__c].Volume__c *0.00551)/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Gallons",
([Opportunity_Volume__c].Volume__c /(42000* 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c )), 
"KT", 
([Opportunity_Volume__c].Volume__c  * [Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) /  
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Tonne", 
(([Opportunity_Volume__c].Volume__c  * [Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) 
/ [Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c ) / 1000, 
1))​​​​​​

 
Geena Nohinek LepkeGeena Nohinek Lepke
Getting the following error now: User-added image
Adam JohnsonAdam Johnson
I don't think you have an ELSE value outside of your CASE?  You have IF the formula evaluate to TRUE, then run the CASE function.  Which ends with the else of 1 but you don't have an IF statement False.  I think you just need to add a 0 or NULL between your last two parentheses:

/ 1000, 1) 0 )​​​​​​
Steve MolisSteve Molis
Ahhhh!  missed the Else result
IF(
AND(
TEXT([Opportunity_Volume__c].RecordType.Name) = "Commercial", 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c  >= 1
), 
CASE( [Opportunity_Volume__c].User_Unit_of_Measure__c, 
"KBD", 
[Opportunity_Volume__c].Volume__c  * 
([Opportunity_Volume__c].Duration_Value_Hidden__c / [Opportunity_Volume__c].DaysYear__c), 
"Lt", 
(0.00000629*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"M3", 
(0.006290*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MGY", 
[Opportunity_Volume__c].Volume__c * 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c *
0.0652/[Opportunity_Volume__c].[Opportunity_Volume__c].DaysYear__c, 
"ML", 
(6.28930817610063*[Opportunity_Volume__c].Volume__c )/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MT", 
([Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  
* [Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"ST", 
([Opportunity_Volume__c].Volume__c *0.00551)/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Gallons",
([Opportunity_Volume__c].Volume__c /(42000* 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c )), 
"KT", 
([Opportunity_Volume__c].Volume__c  * [Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) /  
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Tonne", 
(([Opportunity_Volume__c].Volume__c  * [Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) 
/ [Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c ) / 1000, 
1), 
NULL)​​​​​​

 
Geena Nohinek LepkeGeena Nohinek Lepke
Ok, I just used the latest one and still got an error message. Also, this is being used for a process builder.

User-added image
Adam JohnsonAdam Johnson
Where in a process builder?
Steve MolisSteve Molis
Can you post a more complete screenshot where you're seeing that error?

Thanks
Geena Nohinek LepkeGeena Nohinek Lepke
Here is a bigger screenshot but not the entire thing.

User-added image
Steve MolisSteve Molis
That Formula Editor is infamously twitchy...  I've seen it throw syntax errors on perfectly good Formulas. 

I would clear the whole thing out and re-enter the Formula (make sure you use the "Use this Formula" button)
Geena Nohinek LepkeGeena Nohinek Lepke
I am still getting an error even when I cleared it out and used the "Use this Formula" button. Any other ideas? 

Thanks for the help!
Steve MolisSteve Molis
Oaky I think I found it

[Opportunity_Volume__c].[Opportunity_Volume__c].DaysYear__c


Try this
IF(
AND(
TEXT([Opportunity_Volume__c].RecordType.Name) = "Commercial", 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c  >= 1
), 
CASE( [Opportunity_Volume__c].User_Unit_of_Measure__c, 
"KBD", 
[Opportunity_Volume__c].Volume__c  * 
([Opportunity_Volume__c].Duration_Value_Hidden__c / [Opportunity_Volume__c].DaysYear__c), 
"Lt", 
(0.00000629*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"M3", 
(0.006290*[Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MGY", 
[Opportunity_Volume__c].Volume__c * 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c *
0.0652 / [Opportunity_Volume__c].DaysYear__c, 
"ML", 
(6.28930817610063*[Opportunity_Volume__c].Volume__c )/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c, 
"MT", 
([Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  
* [Opportunity_Volume__c].Volume__c ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"ST", 
([Opportunity_Volume__c].Volume__c *0.00551)/ 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Gallons",
([Opportunity_Volume__c].Volume__c /(42000* 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c )), 
"KT", 
([Opportunity_Volume__c].Volume__c  *  
[Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) /  
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c , 
"Tonne", 
(
(
[Opportunity_Volume__c].Volume__c  * [Opportunity_Volume__c].Product_Lookup__c.Product_Factor__c  ) / 
[Opportunity_Volume__c].Opportunity__c.Duration_Value_Hidden__c ) / 1000, 
1), 
NULL)​​​​​​

 
This was selected as the best answer
Geena Nohinek LepkeGeena Nohinek Lepke
Thank you so much for your help! I really appreciate it!
Steve MolisSteve Molis
No problem Geena, glad you got it working (and thanks for the +Best Answer)