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
samsafin42samsafin42 

Formula field is a no-show on Visualforce page

I have done some searching, and I am fairly well stumped. I am making a pretty simple Visualforce page on a custom object, nothing more than some fields and report charts. However, my formula fields (of which there are three) are not appearing at all. I thought perhaps it was only because, during build, I didn't assign a record. After selecting a record, it still is not rendering them. Here's the VF:
 
<apex:page sidebar="false" showheader="false" standardcontroller="Weekly_Metrics__c">
  <br></br>
  <center><h1>Welcome, {! $user.lastname}
  <br/>You are viewing metrics for the week of {!Weekly_Metrics__c.name}.
  </h1></center>
  <apex:pageBlock title="Opportunity (D) Pipeline">
      <apex:pageBlockSection title="This week's metrics">
      <apex:outputField value="{!Weekly_Metrics__c.Opportunity_Target__c}"/>
      <apex:outputField value="{!Weekly_Metrics__c.Opportunity_Actual__c}"/>
      <apex.outputField value="{!Weekly_Metrics__c.Opportunity_Percent_to_Target__c}"/>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Changes this Quarter">
      <analytics:reportChart reportId="00Oj00000047r9p"></analytics:reportChart>
      </apex:pageBlockSection>
      </apex:pageBlock>
    <apex:pageBlock title="Proposal (C) Pipeline">
      <apex:pageBlockSection title="This week's metrics">
      <apex:outputField value="{!Weekly_Metrics__c.Proposal_Target__c}"/>
      <apex:outputField value="{!Weekly_Metrics__c.Proposal_Actual__c}"/>
      <apex.outputField value="{!Weekly_Metrics__c.Proposal_Percent_to_Target__c}"/>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Changes this Quarter">
      <analytics:reportChart reportId="00Oj00000047rAd"></analytics:reportChart>
      </apex:pageBlockSection>
  </apex:pageBlock>
   <apex:pageBlock title="Contract (A) Pipeline">
      <apex:pageBlockSection title="This week's metrics">
      <apex:outputField value="{!Weekly_Metrics__c.Contract_Target__c}"/>
      <apex:outputField value="{!Weekly_Metrics__c.Contract_Actual__c}"/>
      <apex.outputField value="{!Weekly_Metrics__c.Contract_Percent_to_Target__c}"/>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Changes this Quarter">
      <analytics:reportChart reportId="00Oj00000047rAs"></analytics:reportChart>
      </apex:pageBlockSection>
  </apex:pageBlock>
  </apex:page>
The missing fields are all of the "Percent to Target" fields - third ones down in each block section. 

The formulas themselves are rather simple - literally just (X_Actual__c/X_Target__c).

I could not find anything saying that this type of formula could not be used with outputField - did I miss some huge piece of the puzzle?


 
Best Answer chosen by samsafin42
Terence_ChiuTerence_Chiu
It looks like your outputField tags on line 10, 20, and 30 reads as <apex.outputField>  with a period instead of <apex:outputField> with a colon. Can you check your VF page and see if it has the same typo ? You might want to also check if the profile has access to those fields via field level security.

All Answers

Terence_ChiuTerence_Chiu
It looks like your outputField tags on line 10, 20, and 30 reads as <apex.outputField>  with a period instead of <apex:outputField> with a colon. Can you check your VF page and see if it has the same typo ? You might want to also check if the profile has access to those fields via field level security.
This was selected as the best answer
samsafin42samsafin42
ARGH! Thank you! I am both relieved and a little angry that it was something so small that I just completely missed. Staring at the same thing for too long, I guess.

Thanks again!