You need to sign in to do that
Don't have an account?
Test a field before displaying it in VF email template
Hi,
Here is a portion of my VisualForce email template:
<tr>
<td><th align="right">Ship to Address</th></td>
<td align="left">{!relatedTo.GS_Address__r.Address1__c}</td>
</tr>
<tr>
<td><th align="right"></th></td>
<td align="left">{!relatedTo.GS_Address__r.Address2__c}</td>
</tr>
<tr>
<td><th align="right"></th></td>
<td align="left">{!relatedTo.GS_Address__r.Address3__c}</td>
</tr>
<tr>
<td><th align="right"></th></td>
<td align="left">{!relatedTo.GS_Address__r.Address4__c}</td>
</tr>
<tr>
<td><th align="right"></th></td>
<td align="left">{!relatedTo.GS_Address__r.Attn__c}</td>
</tr>
<tr>
<td><th align="right"></th></td>
<td align="left">{!relatedTo.GS_Address__r.City__c},{!relatedTo.GS_Address__r.ST_PROV__c}</td>
</tr>
<tr>
<td><th align="right"></th></td>
<td align="left">{!relatedTo.GS_Address__r.PostalCode__c}</td>
</tr>
I want to do the <tr> and <td> for Address2,3 and 4 only if those field have a value. I don't want empty lines between Address1 and City.
So, how can I test the value before displaying the field?
Thanks
Patrick
_c)" > (for example). This will display only if the referenced field isn't blank.
All Answers
_c)" > (for example). This will display only if the referenced field isn't blank.
Working,
Thank you
Patrick