Documente Academic
Documente Profesional
Documente Cultură
Prepared By
Venkateshwara Rao M
The module offer letter belongs to the “Recruit RAW” product being currently
done by us for the automation of the Team Rainbow Recruitment at Wipro Technologies.
Problem Encountered:
I had to show the preview of the offer letter for the HR Person who is filling up
the Offer Letter Template. But to do that and show the output on a PeopleSoft page with
formatted text was tedious with normal pages and style sheet objects in PeopleSoft.
Text formatting includes – making part of the text bold, italics, different fonts, colouring
the text.
Note: Normal way of doing this is to create a Style Sheet object and apply the same to
the contents on the page.
Other problem was to include the unsaved (transient) data on the page to be shown on the
preview page dynamically.
Alternatives:
Normal PeopleSoft pages can show any static text which I include during design
time and is shown on the portal page without any formatting.
As mentioned above formatting can be done by creating Style Sheets and
attaching them to the required controls.
I used HTML Object in conjunction with HTML Area to achieve the desired
functionality.
The steps I followed to get the solution to the above problem is given below:
ii. Enter the HTML content in the HTML Object along with substitution
parameters (See picture1). In my case I got the content from the e-mail offer
letter which I got from Wipro University.
iv. Create a Derived WorkRecord with a field of length greater than the HTML
content of the HTML Object. (See Picture 2) In the example the length is
27000.
v. On the primary page I created a push button (Preview) and linked it to the
Derived WorkRecord and loaded the secondary page through PeopleCode.
vi. In the Preview Button FieldChange event write the code to fetch the HTML
Object content, while passing the substitution parameter values
viii. Set the HTML Area control properties to the Derived WorkRecord Name and
Record Field.
ix. At runtime the HTML content is rendered on the secondary page, the way I
wanted it to be. (See picture 9)
Pic 8: The Offer Letter Template Page with Preview button (circled)
This way I achieved the desired functionality with minimal effort. This is because
I already had my Offer Letter given by WIPRO in the HTML Page. I reused the HTML
Tags used in that page in the HTML Object and replaced the references to my name and
other details with BIND Variables and substituted them with the actual data through
coding.
Advantages:
By this method of presenting the content, creation of Style Sheet objects and
attaching them to the object can be avoided.
Also the HTML page can be created using HTML Editors such as Macromedia
Dreamweaver in no time. The source (tags et of the page can be used in PeopleSoft
HTML Object instead of typing the HTML tags thereby saving time and creating good
presentable formatted output .
<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>
&HTMLField = GetField();
&string = GetHTMLText(HTML.TABLE_HTML);
&HTMLField.Value = &string;
GetHTMLText
Syntax
GetHTMLText(HTML.textname [, paramlist]
Where paramlist is an arbitrary-length list of values of undetermined (Any) data type in the form:
Description
Note. Use the GetHTMLText function only to retrieve HTML, or HTML that contains a JavaScript
program, from an HTML definition. If you have an HTML definition that contains only JavaScript,
use the GetJavaScriptURL Response object method to access it.
See GetJavaScriptURL.
Restrictions on Use
Use this function with the PeopleSoft Internet Architecture. If run from a 2-tier environment, the
parameter substitution does not take place.
Parameters
HTML. textname Specify the name of an existing HTML text from an HTML definition.
Returns
The resulting HTML text is returned as a string.
Example
The following is the text in the HTML definition TEST_HTML:
This is a %BIND(:1) and %BIND(:2) test.