proficient in a number of different languages and applications. With a laundry list that includes PeopleCode, Application Engine, App Servers, Web Servers, Crystal Reports, COBOL, and SQR, your breadth of knowledge is constantly being challenged. With the introduction of new technologies like Integration Broker and Portal, the list continues to expand.
Although we may feel that we are stretched
thinner today than in the past, we have always had to reach across various technical tools. COBOL programming centered on a single language, but JCL had its own rules to follow. And while COBOL programs were written for production jobs, there were always utilities that were quickly written in a simpler language such as DYL or BASIC. So today, even though PeopleSoft may be your main focus, with its plethora of integrated products, its not a bad idea to have additional tools at your side.
13
Just as languages such as Java and C++ were
V P 1
M A Y
J U N
2 0 0 3
used in the Windows environment to
complement a PeopleSoft installation, so too can internet-based scripting tools be used to supplement your overall solution in Version 8.
PeopleSoft may be your
main focus, with its plethora of integrated products, its not a bad idea to have additional tools at your side. Since PeopleSoft is now a web-based product, it is important to take a look at additional capabilities that might be gained through web tools like Internet scripting. Internet scripting can take two forms in PeopleSoft: server-side or client-side. Serverside scripting is performed through PeopleCode using IScripts. I wont be discussing IScripts in this article, but there are some good sections in the PeopleBooks on writing IScripts. On the
client, browser scripts can be developed
through PeopleTools, and Ill describe how to introduce browser scripts using the HTML area control.
Figure 1: Page Field Properties
Scripting provides additional flexibility in your
applications. Things that arent necessarily possible or easy to implement in PeopleTools can be done using browser scripts. In the PeopleBooks, PeopleSoft describes two specific examples where scripting may be desired: 1) When a second form is needed on a page. PeopleSoft wraps all pages in a single form and therefore cannot accommodate two forms. 2) When the page being developed doesnt need to access the database. I tend to be very conservative when programming browser scripts for PeopleSoft. I usually only introduce a script on a page where the number of users is small and controlled. You really need to be aware of which browsers will be hitting the page and which versions of those browsers will be used. Scripts can be written in a variety of scripting languages, but two of the most common languages are JavaScript and VBScript. You can use your preferred scripting language when you write your scripts in PeopleSoft. Normally, I will
I usually only introduce a
script on a page where the number of users is small and controlled. use JavaScript in web pages because it is more widely supported across browser platforms. However, for the example in this article, I elected to use VBScript since my user base was
very small and the browser and hardware
configurations were known. To highlight the potential uses of browser scripting, Im providing an example of a page that I developed to help our internal technology group track employee network accounts. The page displays PeopleSoft data alongside data from Microsofts Active Directory.
The HTML Area Control
Using an HTML area control, I can access scripting code from an HTML object, a Message Catalog entry, or directly through the assignment of a string variable or constant. To get started, I first added an HTML area control to an existing custom page. I then opened up the properties of the HTML area and set the page field properties. (See Figure 1) I specified the record and field names as HR_LBL_WRK.HTMLAREA. The fieldname could have been any valid fieldname; it did not need to be called HTMLAREA. The text for the control is set in Page PeopleCode.