I have a custom visualforce page that has page blocks. When the render condition is false, I receive the expected results when previewing.
The issue is when I change the render criteria to true and preview the page, the page is blank.
I know for a fact the "true" render condition should display at least one record.
Why does the true condition not display the expected result.
rendered="{!IF(Record.Is_Reviewed__c=False,true,false)}"
vs rendered="{!IF(Record.Is_Reviewed__c=True,true,false)}"*
Page
<apex:page lightningStylesheets="true" standardController="BMCServiceDesk__Incident__c" recordSetVar="Records" showQuickActionVfHeader="false">
<apex:form >
<!-- Incident Record -->
<apex:repeat value="{!Records}" var="Record">
<apex:pageBlock rendered="{!Record.Is_Reviewed__c==True}">
<apex:outputField value="{!Record.BMCServiceDesk__Launch_console__c}" />
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlock>
</apex:repeat>
</apex:form>
</apex:page>
Example: I've added the is reviewed check box after the ticket number. If true its blank - the check box doesn't display at all. If false it renders the check box empty box. ANY field I use has the same results.
False render condition
Is_Reviewed__c
boolean field or text field? and secondly userendered="{!Record.Is_Reviewed__c}"
as it displayes based on true conditionIF(somecondition, true, false)
with simplysomecondition
. Also you can even replacerecord.Is_Reviewed__c=true
with simplyrecord.Is_Reviewed__c
. Regardless, check your Field Level Security.<apex:outputField value="{!Record.Is_reviewed__c}"/>
as a sort of debug statement right below the apex:repeat.