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
Andrew HeidrichAndrew Heidrich 

Field won't display on Visualforce page

Hi -

At my wit's end with this one.  I have developed a simple VF page to display information from one object, and one of the fields will not display no matter what I try.  In the rendered page, the field value is replaced with a ridiculously long IF statement inside of script tags that makes no sense to me.  I've tried including the field directly in the HTML - {!School_Interaction__c.StoredGrade_Levels_Implementing__c} and tried wrapping it in <apex:outputField> tags.  The result is the same.  The field is blank in the page but when I inspect the element the long convoluted IF script is there in its place.

The field I am trying to include is a text field that contains numbers separated by commas (it was originally a text formula and I created a WFR and Field Update to move it to a text field and am referencing the text field - I did this as a troubleshooting step; the formula and the text field both have the same problem on the VF page).  Both the formula and the text field display fine on the record detail page.  I am displaying lots of other fields on this VF page without issue.  I've tried wrapping the field in HTMLENCODE, JSINHTMLENCODE, nothing.

I've tried modifiying the text field to include the HTML code for a comma (e.g. &#44...) instead of a comma as well.  The field just won't display on my VF page, and it is the last thing keeping me from rolling this out.  Help!!!  Thanks.


Best Answer chosen by Andrew Heidrich
Andrew HeidrichAndrew Heidrich
Gah.  I'm an idiot.  All the hours I spent on this and right after I post a question here I figure it out.  I missed that one field for Read access in the public profile for the site.  Permissions issue, and of course it was.  Hindsight, 20/20, etc.  Disregard.  Thanks SF Community for being an echo chamber for my own dumb self.  Well, maybe it will help somebody else someday.  Cheers.

All Answers

Andrew HeidrichAndrew Heidrich
Clarifying - in the rendered page, the field display is BLANK/invisible but the script tags and if statement are visible when you inspect the element.
Andrew HeidrichAndrew Heidrich
Sorry, 1 more comment:  apparently the script tags only appear when I use apex:outputField tags.  If I try to include the field directly, it's just blank.  Nothing returns at all in the VF page.
Andrew HeidrichAndrew Heidrich
Gah.  I'm an idiot.  All the hours I spent on this and right after I post a question here I figure it out.  I missed that one field for Read access in the public profile for the site.  Permissions issue, and of course it was.  Hindsight, 20/20, etc.  Disregard.  Thanks SF Community for being an echo chamber for my own dumb self.  Well, maybe it will help somebody else someday.  Cheers.
This was selected as the best answer