0

I'm using this code now:

<apex:outputText rendered="{!NOT(ISBLANK(Description__c))}" value="{!Description__c}"/>

But sthis string is between another strings, and when I use this code, I'm getting just a blank string instead of deleting it completely. I don't need a space there. How can I implement it?

P.S. I'm working with renderAs="pdf".

0

You can make use of OutputPanel attribute

<apex:outputPanel rendered="{!(!ISBLANK(Description__c))}">
   <apex:outputText value="{!Description__c}"/>
</apex:outputpanel>

If Description is null/empty this wouldn't be visible/no space would be displayed.

| improve this answer | |
  • Thank you. It works! – Apelsinova Oct 23 '19 at 11:50
0

You could try using an old plain html tag like this

{!Description}

If there's no description, the tag shouldn't show up.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.