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
Best Answer
You need to change the rendered condition like:
or
or