You need to sign in to do that
Don't have an account?
Display Count Variables in Visualforce Page
I'm trying to write a visualforce page that displays variables from an Apex Class in a table.
Here's the Apex Class
And then the Visualforce Page:
The error message is "Unexpected Token: Integer"
Here's the Apex Class
public class SettersTestController { public list <Task> ListCallAry Integer CallAry = [SELECT count() FROM Task WHERE skyplatform__Is_Call_Record__c = TRUE And CreatedDate = THIS_MONTH And CreatedBy = '0056A000001IVgU']; public list <Event> ListSetAry Integer SetAry = [SELECT count() FROM Event WHERE RecordTypeId = '0126A0000004Qle' And CreatedDate = THIS_MONTH And Appoint_Set_By__c = '0056A000001IVgU']; public list <Event> ListShownAry Integer ShownAry = [SELECT count() FROM Event WHERE RecordTypeId = '0126A0000004Qle' And Type = 'Appointment - Shown' And ActivityDateTime = THIS_MONTH And Appoint_Set_By__c = '0056A000001IVgU']; }
And then the Visualforce Page:
<apex:page Controller="SettersTestController"> <apex:pageBlock title="Test"> <apex:pageBlockSection> <table> <tr> <th>Name</th> <th>Calls</th> <th>Set</th> <th>Shown</th> </tr> <tr> <td>Ary</td> <td><apex:outputField value="{!Task.ListCallAry}"/></td> <td><apex:outputField value="{!Event.ListSetAry}"/></td> <td><apex:outputField value="{!Event.ListShownAry}"/></td> </tr> </table> </apex:pageBlockSection> </apex:pageBlock> </apex:page>
The error message is "Unexpected Token: Integer"
Controller:
Please do not forget to mark this thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.
Best,
Nithesh
All Answers
Controller:
Please do not forget to mark this thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.
Best,
Nithesh