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
Matthew AllenMatthew Allen 

VF code syas Missing ) ?

Hi,

I have the below piece of code which is returning a Syntax error of 'Missing )'

All looks ok to me??

<td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Field1 >0, '#004489', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!IF(Field2 = "Group", Field3 , Field4)}" /></apex:outputLabel></td>

Any ideas?
Best Answer chosen by Matthew Allen
Khan AnasKhan Anas (Salesforce Developers) 
Hi Matthew,

I trust you are doing very well.
 
If you use outputText it will work.
 
<td style="width:20%">
    <apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Field1 >0, '#004489', '#d9d9d9')};">
        <apex:outputText label="AccNAme" value="{!IF(Field2 = "Group", Field3 , Field4)}" />
    </apex:outputLabel>
</td>


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Matthew,

I trust you are doing very well.
 
If you use outputText it will work.
 
<td style="width:20%">
    <apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Field1 >0, '#004489', '#d9d9d9')};">
        <apex:outputText label="AccNAme" value="{!IF(Field2 = "Group", Field3 , Field4)}" />
    </apex:outputLabel>
</td>


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas
This was selected as the best answer
Matthew AllenMatthew Allen
My hero, thank you so much!
Matthew AllenMatthew Allen
Any chance you can help me with this one also? I have had to add an additional paramter to the above code, so it now reads like this but am getting the error - The element type "apex:outputLabel" must be terminated by the matching end-tag "</apex:outputLabel>"
 
<td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color: {!IF(Field1 = "Group" && Field2 >0, '#004489', 
                                      IF(Field1 = "Company" && Field3 >0, '#004489',
                                      '#d9d9d9'))};">
    <apex:outputText label="AccNAme" value="{!IF(Field1 = "Group", Field4 , Field5)}" /></apex:outputLabel>
</td>

thank you for your help