You need to sign in to do that
Don't have an account?
Michael M
Apex Outputfield default text
I have a simple VF page that displays one field from the object. If the field is blank/null, I want the page to display text that says "No notes entered". Is there a way to do this?
Here is my page so far:
<apex:page standardController="Discharge__c" lightningStylesheets="true">
<apex:pageblock >
<apex:repeat value="{!Discharge__c}" var="dc">
<apex:outputField value="{!dc.Progress_Notes__c}" id="aa"/>
</apex:repeat>
</apex:pageblock>
</apex:page>
Here is my page so far:
<apex:page standardController="Discharge__c" lightningStylesheets="true">
<apex:pageblock >
<apex:repeat value="{!Discharge__c}" var="dc">
<apex:outputField value="{!dc.Progress_Notes__c}" id="aa"/>
</apex:repeat>
</apex:pageblock>
</apex:page>
You can try like below:
Hope this helps!
Thanks
All Answers
Please try this in line 4: Hope this helps! Please mark as best if it does.
Thanks
You can try like below:
Hope this helps!
Thanks