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
Vinitha SubramanyaVinitha Subramanya 

IF formula receiving syntax error missing ')' in summary report formula

Hi All,

I am trying to build a summary report formula for our funding report but receive the Syntax Error. Missing ")". appreciate your advise on this.
User-added image
Best Answer chosen by Vinitha Subramanya
Andrew GAndrew G
:UNIQUE will do a count of unique values of that type, in this case it would count the number of unique record types in the report.  Therefore, it will generage a number which fails in the comparison to the string, being the record type ID in quotes.

I would remove the UNIQUE keyword and test for RecordType.Id = 'that string'

regards
Andrew

All Answers

Abhishek BansalAbhishek Bansal
Hi Vinitha,

Please use the below formula syntax:
If(
	AND(
		Opportunity.Users__c:SUM <= "2",
		RecordType:UNIQUE = "idvalue"
	),
	ROUND(........),
	ROUND(.......)
)

Let me know if you still face any issue.

Thanks,
Abhishek Bansal.
Vinitha SubramanyaVinitha Subramanya
Hi Abhishek,

this is what I get now.
User-added image
Abhishek BansalAbhishek Bansal
Please replace "2" with just 2
Vinitha SubramanyaVinitha Subramanya
That gives me this error.
Incorrect parameter type for operator '='. Expected Number, received Text 
Abhishek BansalAbhishek Bansal
Can you send me your complete formula how it looks like ?
Vinitha SubramanyaVinitha Subramanya
sure
User-added image
Abhishek BansalAbhishek Bansal
It's causing issue for the record type id 
can you please try to remove the "" from record type id as well.
I am not sure how this UNIQUE function work, please check on google how to pass record id in these type of functions.
Once that is corrected your formula will work fine.

Thanks.
Andrew GAndrew G
:UNIQUE will do a count of unique values of that type, in this case it would count the number of unique record types in the report.  Therefore, it will generage a number which fails in the comparison to the string, being the record type ID in quotes.

I would remove the UNIQUE keyword and test for RecordType.Id = 'that string'

regards
Andrew
This was selected as the best answer
mukesh guptamukesh gupta
Hi VInitha,

Please use below code:-
 
if(
	AND(Opportunity.Users__c:SUM<=2,
	RecordTypeId = '012w0000000UxSUAA0'
	),
	ROUND(Funding__c.Funding_Amount_Net__c:SUM,-3),
	ROUND(Funding__c.Funding_Amount_Net__c:SUM)

)

If this solution is usefull for you, Please mark as a Best Answer to help others.


Regards
Mukesh

 
Vinitha SubramanyaVinitha Subramanya

Thanks, Andrew! Removing the UNIQUE keyword from the record type solved it.