You need to sign in to do that
Don't have an account?
Sorcerer7
How do I pull a formula field into a Blocktable?
I am building a Visualforce page that lists the Training videos we offer. I an using a custom object for the training videos and in the table on the VF page, I need to list the "Course Code" for the video. The Corse Code field is a formual field. I am getting this error when I save..
"Error: Formula expression is required for attribute value in <apex:column> in Sales_Certification_Courses at line 10 column 59"
Here is the code so far...
<apex:page standardController="Guidance_University__c" recordSetVar="Guidance_University__c" sidebar="false">
<h1> Welcome to the Guidance University Sales Certification Courses </h1>
<apex:pageBlock >
<apex:pageBlock title="Guidance University Sales Certification Training Videos">
<apex:pageBlockTable value="{!Guidance_University__c}" var="a">
<apex:column value="{!a.name}"/>
<apex:column value="{Course_Code_v2__c}"/>
<apex:column value="{Course_Level__c}"/>
<apex:column value="{Topic_Subject__c}"/>
<apex:column value="{video_Link__c}"/>
</apex:pageBlockTable>
</apex:pageBlock/>
</apex:page>
"Error: Formula expression is required for attribute value in <apex:column> in Sales_Certification_Courses at line 10 column 59"
Here is the code so far...
<apex:page standardController="Guidance_University__c" recordSetVar="Guidance_University__c" sidebar="false">
<h1> Welcome to the Guidance University Sales Certification Courses </h1>
<apex:pageBlock >
<apex:pageBlock title="Guidance University Sales Certification Training Videos">
<apex:pageBlockTable value="{!Guidance_University__c}" var="a">
<apex:column value="{!a.name}"/>
<apex:column value="{Course_Code_v2__c}"/>
<apex:column value="{Course_Level__c}"/>
<apex:column value="{Topic_Subject__c}"/>
<apex:column value="{video_Link__c}"/>
</apex:pageBlockTable>
</apex:pageBlock/>
</apex:page>
I have modified your code.
Please update your code as below :
Hope everything is fine now :)
Thanks,
Abhishek
All Answers
There is a syntax error in your code which has been corrected by me.
Please find the modified code below :
You were missing "!" in colum values.
Hope this helps.
Thanks,
Abhishek
Thank you so much, I can't believe I missed that.
I also had one too many "apex:pageBlock"'s in there.
Now I am getting this error..
Error: Sales_Certification_Courses line 21, column 16: The end-tag for element type "a" must end with a '>' delimiter
Error: The end-tag for element type "a" must end with a '>' delimiter.
Here is the code now...
<apex:page standardController="Guidance_University__c" recordSetVar="Guidance_University__c" sidebar="false">
<h1> Welcome to the Guidance University Sales Certification Courses </h1>
<apex:pageBlock ="Guidance University Sales Certification Training Videos">
<apex:pageBlockTable value="{!Guidance_University__c}" var="a">
<apex:column value="{!a.name}"/>
<apex:column value="{!Course_Code_v2__c}"/>
<apex:column value="{!Course_Level__c}"/>
<apex:column value="{!Topic_Subject__c}"/>
<apex:column value="{!video_Link__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
This stuff drives you nuts sometimes. :)
Again there is a syntax mistake in your code.
Please change your code as below :
You were missing title in PageBlock.
Thanks,
Abhishek
Error: Unknown property 'Guidance_University__cStandardController.Course_Code_v2__c'
Is that becasue that field is a "formula field"?
I have modified your code.
Please update your code as below :
Hope everything is fine now :)
Thanks,
Abhishek
Have a new question for you. I would like to put a "filter" into the code, so that a user can select training videos that are in a certian category. I can't find the section in the on line developers guide.
Can you help with this?
Thanks