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
Rytec AdministratorRytec Administrator 

Error: Syntax error. Missing ')' in formula

IF(  ROI_No_of_Months__c  < 13,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30)
IF( ROI_No_of_Months__c  > 24,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFee", "yellow", 30, 30),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 30, 30),
))

Any help would be appreciated.  Thanks!
Best Answer chosen by Rytec Administrator
David Zhu 🔥David Zhu 🔥
You may try this:

IF(  ROI_No_of_Months__c  < 13,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30),
IF( ROI_No_of_Months__c  > 24,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFee", "yellow", 30, 30),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 30, 30)
))

All Answers

David Zhu 🔥David Zhu 🔥
You may try this:

IF(  ROI_No_of_Months__c  < 13,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30),
IF( ROI_No_of_Months__c  > 24,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFee", "yellow", 30, 30),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 30, 30)
))
This was selected as the best answer
Rytec AdministratorRytec Administrator
PERFECT!! Thanks so much! Wendy Zangl Sales Operations Manager | Rytec Corporation Direct: 262.677.6128 |Mobile: 414.640.6152 wzangl@rytecdoors.com | www.rytecdoors.com [cid:image001.png@01D5C154.B6C4EBB0]
Rytec AdministratorRytec Administrator
Good afternoon, My user asked for greater than 36 to be gray. Now I am getting a syntax error. Can you please assist again? Sorry to bother you!! I really appreciate the help! IF( ROI_No_of_Months__c < 13, IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 20, 20), IF( ROI_No_of_Months__c > 24 36, IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFlp", "gray", 20, 20), IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 20, 20) ))) Wendy Zangl Sales Operations Manager | Rytec Corporation Direct: 262.677.6128 |Mobile: 414.640.6152 wzangl@rytecdoors.com | www.rytecdoors.com [cid:image001.png@01D5C154.B6C4EBB0]
mukesh guptamukesh gupta
Hi Rytec,

Please copy this code and paste your side :-
 
IF( ROI_No_of_Months__c < 13, 
 IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 20, 20), 
 IF( ROI_No_of_Months__c > 36, 
 IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFlp", "gray", 20, 20), IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 20, 20) ))
If this solution is usefull for you, Please mark as a Best Answer to help others.


Regards
Mukesh


 
Rytec AdministratorRytec Administrator
Thank you so much Mukesh.  I think I should be more clear.
The requirement now is to add gray indicator if the ROI months are greater than 36.
Red for greater than 24 but less than or = 36 months.
Yellow for greater than or = to 13 but less than 24 and green for less than 13.

Gray >36
red 25-36 months
yellow 13-24 months
green 1-12 months

I really appreciate your help.  The code above did work for every color but was missing yellow.  Many thanks!!!  Have a great day! :)
 
Rytec AdministratorRytec Administrator
IF( 
ROI_No_of_Months__c  < 13,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30),
IF(
AND(
ROI_No_of_Months__c  >= 13,
ROI_No_of_Months__c  <= 24
),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFee", "yellow", 30, 30),
IF(
AND(
ROI_No_of_Months__c  >= 25,
ROI_No_of_Months__c  <= 36
),
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 30, 30)
IF(
ROI_No_of_Months__c > 36, 
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFlp", "gray", 20, 20), 
),
)
)
)
)
Rytec AdministratorRytec Administrator
Any help/suggestions on the above formula would be appreciated.  Thanks and have a nice day!
Antti KaatonenAntti Kaatonen

Hello wizards, what's wrong with this code? First it says it doesn't recognize >= and <= and when you add quotations, it starts with: syntax error missing ')'. Trying to do 12 months running sales. Please help.

 

IF(
  AND(Opportunity.CloseDate:UNIQUE ">=" (TODAY() - 365),
    Opportunity.CloseDate:UNIQUE "<=" TODAY()
  ),
  Opportunity.ExpectedRevenue.CONVERT:UNIQUE,
  0
)