Using HTML Definitions and the GetHTMLText Function
If you are using the same HTML text in more than one place or if it is a large, unwieldy string, you can create an HTML definition in PeopleSoft Application Designer, and then use the GetHTMLText function to populate an HTML area control.
The following is the HTML string to create a simple table:
<P>
<TABLE>
<TR bgColor=#008000>
<TD>
<P><FONT color=#f5f5dc face="Arial, Helvetica, sans-serif"
size=2>message 1 </FONT></P></TD></TR>
<TR bgColor=#0000cd>
<TD>
<P><FONT color=#00ffff face="Arial, Helvetica, sans-serif"
size=2>message 2</FONT></P></TD></TR>
</TABLE>
</P>This HTML is saved to an HTML definition called TABLE_HTML.
This code is in the RowInit event of the record field associated with the HTML area control:
Local Field &HTMLField;
&HTMLField = GetField();
&string = GetHTMLText(HTML.TABLE_HTML);
&HTMLField.Value = &string;This code produces the following:
This example illustrates the fields and controls on the HTML definition example. You can find definitions for the fields and controls later on this page.
Related Topics