function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kyri TKyri T 

How do you create a table within the Display Text output field

I need to display some information within a table however I cannot seem to create a table when I use the output field 'Display Text'.

 

I have tried using the HTML code to create a table and that didn't work.

 

Any  Suggestions

Best Answer chosen by Kyri T
Jeff TalbotJeff Talbot
When I put this code in a Display Text field on a Screen, it displays my data in a table:

 <table border="2"><tr><td width="180"><b>Client Full Name:</b></td><td>{!varSourceOppContFirstName} {!varSourceOppContLastName}</td></tr><tr><td width="180"><b>Opportunity Name:</b></td><td>{!varSourceOppName}</td></tr><td width="180"><b>Opportunity Record Type:</b></td><td>{!varSourceOppRecTypeName}</td></tr>
<tr><td width="180"><b>Opportunity Stage:</b></td><td>{!varSourceOppStage}</td></tr><tr><td width="180"><b>Total Sale Amount (with tax):</b></td><td>{!varSourceOppGrandTotal}</td></tr></table>

I will admit, getting this to work is frustrating at times. VWF tends to want to autmatically add additional HTML to your code. Best to type your code outside of VWF and then paste it in, then click back an forth a couple of times on the rich text editor icon to be sure that VWF didn't try to add additional HTML tags to your code. Eventually, the code sticks. Not sure why this has to be so tricky.

All Answers

Sonam_SFDCSonam_SFDC

Hi,

 

Do you mean you wish to format the text within the outputText?

or do you wish to format the content you are displaying using outputtext  tags in a table?

 

If its the latter, the following should help: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_panelGrid.htm

Jeff TalbotJeff Talbot
When I put this code in a Display Text field on a Screen, it displays my data in a table:

 <table border="2"><tr><td width="180"><b>Client Full Name:</b></td><td>{!varSourceOppContFirstName} {!varSourceOppContLastName}</td></tr><tr><td width="180"><b>Opportunity Name:</b></td><td>{!varSourceOppName}</td></tr><td width="180"><b>Opportunity Record Type:</b></td><td>{!varSourceOppRecTypeName}</td></tr>
<tr><td width="180"><b>Opportunity Stage:</b></td><td>{!varSourceOppStage}</td></tr><tr><td width="180"><b>Total Sale Amount (with tax):</b></td><td>{!varSourceOppGrandTotal}</td></tr></table>

I will admit, getting this to work is frustrating at times. VWF tends to want to autmatically add additional HTML to your code. Best to type your code outside of VWF and then paste it in, then click back an forth a couple of times on the rich text editor icon to be sure that VWF didn't try to add additional HTML tags to your code. Eventually, the code sticks. Not sure why this has to be so tricky.
This was selected as the best answer