• Tony Mann 9
  • NEWBIE
  • 0 Points
  • Member since 2016


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hello,

I want to write code to populate the following ONLY when populated; 

"Date of Birth: XX/XX/XXXX" 

I am having trouble having the 'Date of Birth:' part render without and error.

My code currently has 'Date of Birth' in the template the entire time.

Code: 

<apex:outputText value="{0, date, MM-dd-yyyy}"> 
           Date of Birth:<apex:Param value="{!IF(NOT(ISBLANK(relatedTo.Date_of_Birth__c)),relatedTo.Date_of_Birth__c, '')}" />
           </apex:OutputText>


Thanks
Hello,

I have code that populates a table from a custom object in my VF email template. I want to have it so the table only shows when their is data in the custom object. Including the header. Code below. 

Is it possible? 

Thanks!

<br><b>Related Family</b></br>   
<br></br>
          <table border="0" >
            <tr >
               <th>Name</th>
               <th>Relationship</th>
               <th>Date of Birth</th>
               <th>Notes</th>
            </tr>
            <apex:repeat var="cx" value="{!relatedTo.Related_Guests__r}">
              <tr>
                <td>{!cx.Name}</td>
                <td>{!cx.Type__c}</td>
                <td>{!cx.Date_of_Birth__c}</td>
                <td>{!cx.Notes__c}</td>
              </tr>
            </apex:repeat>                
          </table>