I've looked through various questions but still haven't found an answer. I have 5 fields that I can display on a VF pdf page and want each one on a different line, but if the IF fails, I don't want a blank line, so can't just put a br at the end. It needs to be inside the IF success part where I currently have & ' '. Please help!
{!IF(activity.CallCycleActivity.Account__r.DementiaBeds__c > 0,'Dementia beds: ' & TEXT(activity.CallCycleActivity.Account__r.DementiaBeds__c) & ' ','')}
{!IF(activity.CallCycleActivity.Account__r.HospitalBeds__c > 0,'Hospital beds: ' & TEXT(activity.CallCycleActivity.Account__r.HospitalBeds__c) & ' ','')}
{!IF(activity.CallCycleActivity.Account__r.VillageBeds__c > 0,'Village beds: ' & TEXT(activity.CallCycleActivity.Account__r.VillageBeds__c),'')}
EDIT (from comments)
If I add:
& 'BR()'
it just displays it as
Dementia beds: 20 BR() Hospital beds: 42 Rest Home beds: 26
If I don't put quotes around it:
& BR()
It displays like this:
Dementia beds: 20_BR_ENCODED_ Hospital beds: 42 Rest Home beds: 26
BR()
inside theIF(...)
?escape="false"
if you are going to use BR() and are using outputText