July 25, 2009

PS Technical: Development Steps

  1. Design the application.
  2. Create field definitions.
  3. Create record definitions.
  4. Build the application data tables.
  5. Create page definitions.
  6. Define components.
  7. Register the components.
  8. Test the application.

July 24, 2009

PS Technical: Field Definitions (Summary)



1. Creating New Field Definitions
  • Create a new field definition.
  • Character (Char)
  • Long Character (Long)
  • Number (Nbr)
  • Signed Number (Sign)
  • Date (Date)
  • Time (Time)
  • DateTime (DtTm)
  • Image (Img)
  • ImageReference (Iref)
  • Attachment (Att)

  • Specify attributes for a new field definition.
  • Label ID
  • Long Name
  • Short Name
  • Def (default)
  • Not Used
  • Chart Field
  • Specify character field attributes.
  • Field Length
  • Format Type : Uppercase, Mixedcase, Numbers Only, SSN, SIN, Raw Binary, Name, Postal Code North America, Postal Code International, Phone Num North America, Phone Number International, and Custom
  • Specify long character field attributes.
  • Maximum Length
  • Raw Binary
  • Specify number field attributes.
  • Integer Positions
  • Decimal Positions
  • Signed
  • Specify date field attributes.
  • Default to 2000 if year less than or equal to (Default is 50)
  • Specify time field attributes.
  • Time Formatting
  • Specify DateTime field attributes.
  • Time Formatting
  • Specify image field attributes.
  • Maximum Length
  • Image Format
  • Specify ImageReference field attributes
  • Note: PeopleSoft supports BMP, DIB, GIF, CUT, EPS, JPG, PCX, PCT, RLE, and TGA image types. At runtime, the user can upload BMP, DIB, GIF, and JPG images to the database.
2. Using Multiple Labels
  • Add a new label.
  • Delete a label.
  • Select record field labels.
3. Opening an Existing Field Definition

4. Viewing Field Properties

5. Changing Field Definitions
  • Change field types.
  • Rename field definitions.
  • Delete field definitions.
  • Print field definitions.
6. Setting Custom Field Formats
  • Understanding Format Notation
  • Lexical characters delimit character expressions and designate interpretation rules.
  • Literal characters represent only themselves.
  • Meta characters represent a class of characters.
  • Meta Symbols: #; 0; .; 9; A; Z; @
  • Lexical Symbols: *; +; []; {}; ?; !; ~; \; ()
  • Changing format families. Max Display Length
  • Editing formats.
  • Add, update, and delete stored and display formats.
  • Enter a description for the family.
  • Specify options, such as uppercase and smart punctuation, for the family.
  • Using family options.
  • Smart Punctuation
  • Make uppercase
  • Test formats.
  • Stored Format Name
  • Display Format Name
  • DB->Display
  • Display->DB
7. Using the Translate Table
  • Understanding the Translate Table
  • Field type is Character.
  • Field length is 1 to 4 characters.
  • Field values consist of a relatively small, static set of values that are not maintained by the user.
  • No other fields relate to this field.
  • Add values to the Translate table.
  • Field Value
  • Effective Date
  • Inactive
  • Long Name
  • Short Name
  • Change translate values.
  • Delete translate values.
  • Save the Translate table.

  • Note 1: When you select the Yes/No Table Edit, the system automatically points to the PSYESNO field in the Translate table
  • Note 2: Translate Table Attributes are: FIELDNAME, LANGUAGE_CD, FIELDVALUE, EFFDT, VERSION, EFF_STATUS, XLATLONGNAME, XLATSHORTNAME, LASTUPDDTTM and LASTUPDOPRID
  • Note 3: To save the Translate table, you must be authorized to modify field definitions. There is a special Translates Only security access level for fields that allows translate values to be updated, but not other field attributes.

July 23, 2009

PS Technical: Record Definitions (Summary)

1. Viewing Record Definitions

  • View basic field definitions.
  • View key-related characteristics and default values.
  • View editing options.
  • View PeopleCode program types.
  • Reorder fields.
  • Size and sort columns.
2. Saving Record Definitions

3. Naming Record Definitions
  • The name length can be up to 15 characters, with the exception of the Temporary Table type, which has a maximum length of 13.
  • The name must begin with a letter and can contain underscores to make it more readable.
  • Avoid special characters, such as # or $, which can cause problems in some database environments.
  • Record Naming Conventions: _TBL, _VW, _DVW, _WRK, _SBR, _QVW, _WL, R_, AUDIT_, WEBLIB_, FUNCLIB_, and DERIVED_
4. Creating a New Record
  • SQL Table; SQL View; Dynamic View; Derived/Work; SubRecord; Query View; Temporary Table; and Non Standard SQL Table Name
  • Keys for dynamic views should not be effective date fields.
5. Opening an Existing Record

6. Manipulating Fields in Record Definitions

  • Insert fields into records.
  • Insert subrecords into records.
6. Set record properties.
  • Set general properties.
  • Set use properties.
  • Create user-defined audit record definitions.
  • Tools Table: Identifies SQL tables owned by Enterprise PeopleTools development, which is typically the same ownership as indicated by the PPLTOOLS project.
  • Managed: Identifies SQL tables owned by Enterprise PeopleTools development that
    contain information which is used by managed (cached) objects.
  • Upgrade Job Not Needed: Identifies SQL tables that do not require an upgrade job to be defined. This option applies only to “A to B” upgrades.
  • The Append ALL (Dynamic Views) option applies to dynamic views. If it is set, at runtime the system appends the WHERE clause generated at runtime to all the SELECT statements in a dynamic view with a UNION. Also, if it is set, at runtime the system generates FILL as the table alias in the WHERE clause condition. For example, FILL. LIKE ’%O%’. You need to specify which table corresponds to the FILL in the dynamic view definition. For example, FROM tableA FILL. This is because the same record field name may exist in two different records.
7. Setting record field properties.
  • Set record field use properties.
  • Add from and through logic to the search page.
  • Set record field edit properties.
  • Move fields in the same record.
  • Move fields to another record definition.
  • Delete a field from a record definition.
  • Rename record definitions.
  • Delete record definitions.
  • Print record definitions.
  • Create SQL view and dynamic view Select statements.
  • Note: Time Zone and Related Date Fields

July 20, 2009

PS Technical: Administering Data

• Use the Build menu.
• Create tables.
• Create indexes.
• Alter tables.
• Create triggers.
• Create views.
• Administer DDL.

1. Understanding Data Administration and the Build Process

Reviewing DDL
The basic components of the PeopleSoft DDL support include the following:
  • DDL model definition: A complete set of the supported DDL statements for each database platform. Statements include Create Table, Create Tablespace, and Create Index. Each DDL model statement has substitution parameters that can be specified at the database level or overridden for individual records.
  • RecordDDL: Specify the DDL model substitution parameters for an individual record.
  • Index DDL: Specify the DDL model substitution parameters for an index.
  • Sizing sets: A way to maintain multiple versions of your DDL model statements for a database platform. For example, you can use one sizing set during a development phase, when tables have only test data, and another during production, when tables have much more data.
Granting Build Authority
PeopleSoft Security enables you to specify which users can build scripts, run scripts (Execute SQL now), maintain DDL, and so on. Access Security from the PeopleTools link in the menu.

Note: The Execute SQL now option is unavailable if you use the Alter Tables Build option. However, you can use the Execute and build script option when using Alter Tables. Selecting this option builds a script with the entire alter SQL. This script may help if errors are encountered during the alter process. However, if there are multiple tables in an alter process and an error occurs, the errors are reported to a log file and the process continues to the next table.

Using Command Line Syntax to Build a Project
  • Connect the project to the source database.
  • Use the build settings from the Windows registry to generate the SQL script for the create or alter processes.
  • Before running the build command line, verify that, the project’s system components are created and loaded and the build options are set in the Windows registry.
  • Available Parameters: HIDE (used to hide the PeopleSoft Application Designer interface), CT (Database type), CS (Server name), CD (Database name), CO (User ID), CP (User password), and PJB ( Project name).
  • Example: PSIDE.EXE −CT MICROSFT −CD CJR810G −CO PTDMO −CP PTDMO −PJB CJR_PRJ
2. Creating Tables
  • Because long character fields operate more efficiently in some database environments when they’re located at the end of the table, the Build process automatically positions long character fields at the end of the table for each database environment.
  • After you build an updated SQL build script and run it, the PeopleTools tables and the system catalog tables are synchronized; the record definition and the application data table are synchronized.
  • Create Indexes: Key fields -> Unique index: (_); Alternate search key fields -> Alternate index: 10 (0-9) per table; Custom indexes -> Custom index: (A-M) per table
  • Note: You can have a maximum of 500 columns per table.
3. Creating Indexes
  • Configure indexes.
  • Add a custom index.
  • Edit the DDL.
4. Altering Tables

to be continued.............

July 19, 2009

PS Technical: PeopleSoft Tables

Table-Based Systems
  • System Catalog tables store physical attributes of tables and views, which your database management system uses to optimize performance.
  • PeopleTools tables contain information that you define using PeopleTools.
  • Application Data tables house the actual data that your users enter and access through PeopleSoft application pages.
Normalized Relational Databases
  • First Normal Form
    The first normal form requires that a table contain no repeating groups of nonkey fields. In other words, when you’re setting up a record definition, if you encounter a field that could have multiple occurrences, put that field in a separate record that is subordinate to the primary record definition (a child record). This allows unlimited occurrences of a repeating field rather than a specified number. Each row of data is uniquely identified by a primary key, which can be a single field or a group of fields that, when concatenated together,
    form a unique key.
  • Second Normal Form
    The second normal form dictates that every nonkey field in a table must be completely dependent on the primary key. If two fields make up the key to a table, every nonkey field must be dependent on both keys together.
  • Third Normal Form
    The third normal form is a corollary to the second; it requires that a nonkey field not be dependent on another nonkey field. With the third normal form, you store shared fields in tables of their own and reference them elsewhere.
  • Note: When designing record definitions, adherence to the third normal form is recommended to increase flexibility and reduce data redundancy.
Record Definition Planning
  • Record Level
    At the record level, determine the ultimate purpose of the record definition and how it will be used in the system. Is it destined to define an underlying SQL table to hold data? Are you building a view to join or retrieve information from other tables? Do you need a temporary work record where you can store derived data?
    You can audit record-level changes, as opposed to individual fields contained in the record definition—an efficient alternative if you plan to audit several fields. More sophisticated use of record definitions, such as sharing information in TableSets and multilanguage controls, are also established at the record level.
  • Field Level
    At the field level, plan the details of what types of fields to add. Should they be character fields or number fields? Should automatic formatting be used? What are the keys to the data stored in the database? Which fields should you audit? Do you want to specify prompt tables so that users can select from lists of valid values that are stored elsewhere in the database?
    In most cases, if you are creating a record definition for a SQL table, you don’t have to worry about record-level definitions for parameters and conditions. Unless you change how a record definition is used, the system automatically assumes that you are defining a record definition for an underlying SQL table.
Effective Dates
Effective dates enable you to keep historical, current, and future information in tables. There are three types of effective dates:
  • Future
    Data rows that have effective dates that are after the system date, which is usually today’s date.
  • Current
    Data row with the most recent effective date that is closest to today’s (system) date, but not a future date. Only one row is the current row.
  • History
    Data rows that have effective dates before the current data row.
  • Note 1: When you’re running a page with effective-dated records and you insert a row, the system copies the contents of the prior row into the new row to save you keying time. Also, anytime you insert an effective-dated row using PeopleCode, the same copying of the prior row’s contents takes place.
  • Note 2: If EFFSEQ is paired with EFFDT, it enables you to enter more than one row with the same effective date. You assign a unique sequence number to each row that has the same effective date. Do not make EFFSEQ a required field—unrequired allows the first EFFSEQ to be zero. Select Display Zero in the page definition to have zeros appear on the page.
Control Tables
Control tables store information that controls the processing of an application. This type of processing might be consistent throughout an organization (in which case the entire organization shares the same control information), or it might be used only by portions of the organization for more limited sharing of data.
  • Sharing One Set of Common Values
    The first type of sharing is to create one table that everyone shares; it stores common information that is valid for all users. Such control tables are ordinarily maintained centrally because the data is shared throughout the entire organization.
  • Sharing Common Values in Overlapping Plans
    What do you do if the codes that are stored in a table are valid only for some users? In this case, you can easily resolve the problem by using two tables.These tables are ordinarily centrally maintained, because the data is being shared by various groups in the organization.
TableSets
  • When none of the information stored in control tables is valid for all users, but the structure of these common tables is the same, you can set up a way to share multiple sets of values. The actual data values differ, but the structure of the control tables remains the same. PeopleTools enables you to share sets of values in a control table through TableSets.
  • When you share tables in PeopleTools applications, you add the setID field as an additional key or unique identifier to the table that you want to share. This key identifies the sets of information in the table that are shared by multiple companies or business units under your corporate umbrella. You then specify a set control field, which identifies which fields map between the original key and the TableSets. You can specify any field that logically identifies the TableSet.
  • To minimize the overhead of defining TableSets, you can define record groups that share table data in a similar manner.
Sharing Tables
  • Add the SetID field to the record definition.
  • Define a set control field as the field controlling the assignment of TableSets.
  • Modify the set control field.
  • Create setIDs.
  • Define record groups to identify the tables and subordinate (child) tables that are affected.
  • Define TableSet controls.
  • Share trees.
  • Unable to create a sample :(

July 18, 2009

FAQ: ByPassing Search Pages

When the PeopleSoft page is visited through the navigation, the Peoplesoft displays the search page to collect the key information to display the page details. However the Peoplesoft provides different functionalities to override the search key functionality in the Component:

  • Search record The Component search page is structured based on the search key values of the Component Search record.When the Search record does not contain any search key fields in the Record structure then the search page will not be displayed for the component. INSTALLATION table does not contain any key structures and it has been setup as the Component Search record. When the component is visited through PIA, the search page will be bypassed and sent directly to PeopleSoft pages.
  • PeopleCode Consider the scenario where the record with search key structure needs to be setup as the Component search record and it need to bypass the Component Search page. In such case, Peoplesoft delivers a ‘SetSearchDialogBehavior’ function to pass the key values through the PeopleCode and bypass the component search page. SetSearchDialogBehavior(0) bypasses the search page.
  • URL The search key values can be passed through the URL also. The URL will be concatenated with the Search Key field name with its value after the menu and the component information. In such case, when the user logins to the PeopleSoft, the PIA will be automatically navigated to the specified page with the Search key values from the URL. When the Search key passed through the URL is not matched then the control will be in Component search page to enter the new search key values.
Note: The Component search page is structured based on the search key values of the Component Search record. When the Search record does not contain any search key fields in the Record structure then the search page will not be displayed for the component.

FAQ: PeopleSoft Links


July 16, 2009

PeopleSoft Technical: PS Query


Query Security
The first step to creating queries is setting up the security. This requires creating a query tree and setting up a permission list that allows access to the query trees. Within the tree all tables that the end user is allowed to view must be included. If a table is not in the query tree, then the query will not be available for the end user to run.

Creating Access Group Trees
Query Access Manager is the administration tool for creating and maintaining your query trees. Navigate to People Tools > Security > Query Security > Query Access Manager.


Permissions
For your end users to be able to have access to run queries and utilize the records in your tree, a permission list should be created. This permission list should be added to one of their roles. Navigate to PeopleTools | Security | Permission And Roles | Permission List to create the permission list.
  • Query_Admin This page allows for viewing of all queries. The ability tokill a query is done from this page.
  • Query_Manager This page allows the creation and running of queries.Give access to this page only if you want your end user to create and change queries.
  • Query_Viewer This page will only allow the end user to run queries they have access to.
  • Sched_Query This page allows for the scheduling of queries.
  • Sched_Query_Qryvw This page will allow the end user to view only the scheduled queries that they have access to.

Query Types
PeopleSoft has delivered six different types of queries. These types are available depending on the permissions given to the end user.
  • User query Uses the Query Manager to retrieve data from the database.
  • Reporting query Basically the same as a user query, except it is designedto be used with other reporting tools, such as Crystal Reports, PS/nVision, Cube Manager, and XML Publisher.
  • Process query A batch query used with Application Engine and the QueryAPI.
  • Role query Used with workflow, to determine who should receive e-mails or work list entry. This query returns a list of roles.
  • Archive query Used by PS Archive Manager for archiving.
  • PS/nVision query Creates a specific data source for PS/nVision reports and matrix layouts.

Query Steps
There are seven major parts to creating a query. Only a few of these steps are required, but they may be needed depending on the query requirements.
  1. Select Records Data is stored in records (tables). Depending on the request, you will need to select the records that store the correct data.
  2. Select Fields Identify the fields from the records that are needed in the query.
  3. Using expression (optional) Expressions are new fields that can be the following: fields that are not on your records, fields combined into one field, or fields using aggregate functions (for example, sums, counts).
  4. Using prompts (optional) Requesting input from the end user (for example, Date range).
  5. Selection criteria (optional) Applying criteria to the data that is being selected to reduce the data returned from the database (for example, only rows that were created in the current year).
  6. Having criteria (optional) Another type of selection criteria, used when the field you are checking is an aggregate value (for example, only pull departments with more than five employees).
  7. Run query View the results of the query.

Query Tables
The objects that are created within the Query Manager are stored in tables. The full list of tables involved in Query is as follows:
  • PSQRYFIELD Stores all fields used in all aspects of query operation.
  • PSQRYDEFN Stores high-level query definitions with version numbers. Non-English definitions are stored in PSQRYDEFNLANG and PSQRYHEADLANG.
  • PSQRYRECORD Stores all records used in all aspects of query creation.
  • PSQRYSELECT Stores all SELECT requirements by select type, including union, subselect, join.
  • PSQRYCRITERIA Stores all criteria expressions in code format.
  • PSQRYBIND Stores runtime prompt data.
  • PSQRYEXPR Stores the text associated with each criteria expression.
  • PSQRYLINK Stores the relationships to child queries.

PeopleSoft Technical: Advanced PeopleCode

Component Buffer
In the simplest terms, the component buffer is the memory area for everything that is stored for the current or active component. The component buffer is broken down into areas that hold field data and record data. The fields are stored in buffer rows or memory rows that hold a particular piece of data. The records are directly related to page controls, which include the primary scroll records, display records, derived/work records, and/or translate table records.
With PeopleCode you can reference the fields in the buffer, page controls in the buffer, and relate buffer fields from the primary scroll record and related display records. Think of the component buffer as the memory area for the main objects on a page. It gives you a way to manipulate,
change, update, and refresh what is currently on the page and only look at or program the active record.

Component Processor
The component processor is the PeopleTools runtime engine that determines firing order for execution of the application from the time the user requests functionality until the time the database is updated.
Events List
Non–Action Event Flowchart Events Waiting for Action Flowchart

The events that fire errors and/or warnings:
  • SearchSave
  • FieldEdit
  • RowDelete
  • RowSelect
  • SaveEdit
The following events can be used for calculation:
  • RowInit
  • FieldChange
  • RowDelete
  • SavePreChange
List of Events and Behaviors

July 15, 2009

PeopleSoft Technical: PeopleCode

Types of PeopleCode Events
- Record Field PeopleCode
- Page PeopleCode
- Component PeopleCode
- Component Record PeopleCode
- Component Record Field PeopleCode
Note: Component code fires before component record code, which fires before component record field code.


Component Record and Component Record Field Events





PeopleCode Event Summary
An event is the way that the PeopleSoft Application Designer associates a program with a definition. Each event is a predefined point in the component processor flow, commonly referred to as the program flow. When an event is encountered in the program flow, it fires on a component, which triggers the PeopleCode program associated with it to process. Each definition can be a single definition or it can be one of an event set, a group of PeopleCode events that fire in a program flow. A definition can fall outside of the component processor. External processes include: Application Engine programs, component interfaces, and application packages. There is also the standard sign-on event, which allows for the creation of a session with the PeopleSoft application and resides external to any and all events.


PeopleTools Menus
PeopleSoft has two types of menus: standard menus and pop-up menus. Each type of menu is defined separately as a standalone definition within your project. PeopleCode can be used only on pop-up menus, not in standard menus. There is only one event on a pop-up menu to write PeopleCode in—ItemSelected. This event fires whenever a menu item is selected from a pop-up menu.

Defining PeopleCode Pop-Up Menu Items
  1. Create a pop-up menu.
    a. In the menu definition, double-click an existing pop-up menu.
    b. Double-click the empty rectangle at the bottom of the menu.
  2. Enter a name and a label for the item.
  3. Select PeopleCode from the Type group to enter the PeopleCode.
  4. Click OK to close and then save your project.


Debugging and Message Functions
  • MessageBox is one of the most powerful debugging tools in your tool chest as a PeopleSoft developer.
  • MessageBox is the preferred method by PeopleSoft. But a WinMessage is a good way to make sure the code you are working on is the code being called.
  • Another really terrific way of debugging is to create a log file and log off anything important. With this method you trap the events in a log, and if something occurs you can trace it back and get a very good idea of what occurred.
  • PeopleCode supports Java objects and PeopleSoft delivers the log4j lib in the PS_HOME/class directory. The following methods can be invoked within the log4j: debug(), info(), warn(), error(), fatal(), and log(). These methods generate log requests during application execution so your code can be riddled with them and they will log off and never disturb your customers.
  • If Logic can be used in PeopleCode to turn logging on and off.

Message Catalog

Message catalogs represent the messages you want to go out to your customers in the production environment. They are the messages that you want displayed when a wrong value is typed or a button is used incorrectly. PeopleSoft delivers thousands of these in its applications and you can create thousands of your own. With PeopleSoft 8.5 the location of the message catalog is stored in a new record named PSMSGCATDEFN. The old record was PS_MESSAGE_CATALOG.


Declaring Variables
PeopleCode variables (except object variables) are all preceded with “&” and then the data type of the assignment statement.
  • ANY
    This variable is used when the data that is being returned into this type is unknown. The use of the type ANY will allow PeopleTools to determine the best match for the variable. Undeclared local variables by default become ANY variables.
  • BOOLEAN
    This variable is a single bit type that can be TRUE(1) or FALSE(0).
  • DATE
    This variable is a standard date that in PeopleCode is in the format YYYY-MM-DD and in the Oracle database is in the format DD-MM-YYY.
  • DATETIME
    This variable is exactly what it says—the date with the time—and is in the following format: YYYY-MM-DD-HH.MI.SS.SSSSSS.
  • TIME
    This variable is expressed as HHMISS. When you use a function that uses TIME, it returns a numeric value.
  • NUMBER
    A NUMBER variable is a decimal value or integers; it can be any number that has decimal points. NUMBER and STRING are the most used variable types in PeopleCode.
  • FLOAT
    This variable represents a floating decimal point number. The FLOAT variable is a number using a machine floating binary point or double precision. And by default the NUMBER data type in PeopleCode is a floating decimal point representation.
  • INTEGER
    This variable is a whole number with no decimal points.
    Tips on when to use NUMBER, INTEGER, or FLOAT variables:
    Use NUMBER when you are unsure, and it will be the primary default way to declare numbers. Use INTEGER when you are counting items; a good example is when you count rows in a rowset. Use FLOAT only when you are performance tuning and the application is already working—and you know what the result should be.
  • STRING
    This variable can be a combination of letters, special characters, and numbers. It is
    initialized by enclosing the declared string in quotes. You can use either single or double quotes. When you need to enclose a string within a string, one type of quote is enclosed by another type. The “best practice” is to enclose strings in double quotes and embedded strings in single quotes.
  • OBJECT
    OBJECT variables have their own data types:
    - PeopleCode Data Buffer Access Types Field, Record, Row, and Rowset.
    - PeopleCode Display Data Types AnalyticGrid, Chart, Grid, GridColumn,
    and Page.
    - PeopleCode Internet Script Data Types Cookie, Request, and Response.
    - PeopleCode Miscellaneous Data Types AESection, AnalyticInstance, Array, Crypt, Exception, File, Interlink, BIDocs, JavaObject (can only be declared as type Local), Message, MCFIMInfo, OptEngine, PostReport, ProcessRequest, RowsetCache, SoapDoc, SQL, SyncServer, TransformData (can only be declared as type Local), XmlDoc, and XmlNode (objects can only be declared as type Local).
    - Global ApiObject Data Type Objects Session, PSMessages collection, PSMessages, all tree classes (trees, tree structures, nodes, levels, and etc.), and query classes.
    - Local ApiObject Data Type Objects Meta SQL, Meta HTML, System
    Variables, and RowSet.

Variable Scopes in PeopleCode
There are three basic variable scopes in PeopleCode: Local, Component, and Global.
There are two types of Local variables: an ordinary Local program variable and a Local function variable. A Local program variable is declared and available during the duration of that program, and a Local function variable is available while the function is called and activated.
  • Global A Global variable is valid during the entire session and can be reset during the session. It is important to understand that its life span is associated with the session and you need to remember to clear and reassign depending on when you plan to use the variable. It is used less often because not that many items need to be valid during the entire session.
  • Component A Component variable is only valid when the object or page that it was created on is valid. This type of variable is used in component interface coding.
  • Local A Local variable is valid during the PeopleCode program or function where the variable was defined. It is the most common variable declaration.


Logic Statements
  • If-Then-Else
    One of the most common and easiest to use PeopleCode logic statements is the if-then-else statement. It allows you to control the flow of your program, it allows for branching, and it allows processing dependent upon a set of terms.
  • Evaluate
    Another form of branching in PeopleCode is done using the Evaluate statement. It is used when you have multiple conditions that exist and you need to evaluate each of them.
  • For
    For statements can be very useful tools. They are excellent when you need to execute statements multiple times, and you need to loop or iterate through them.
  • While
    The While statement is another way to loop and allow for repeated statements in PeopleCode. The loop will process until the expression is false. In a lot of aspects the For loop and the While loop are very similar. Any break within a loop returns control to the next highest level, and processing will continue with the next statement after the loop ends. While loops do have a danger of being written as a runaway loop, with For loops you do have more control.
  • XLAT
    An XLAT item returns true in a component interface if the value is being retrieved from an XLAT table.
Note1: Use /* at the beginning of the comment and */ at the end. This is usually used when a block of code is commented out. REM will remark out a single line of code. Put a ; at the end of the REM statement to terminate and note the end of the comment.
Note2: Use <* at the beginning of the comment and *> at the end. This form of commenting is used to comment within another comment.
Note3: Do not use /+ +/ syntax to make comments, they will be removed by the system the next time you compile or save your PeopleCode as these are used in comments in application classes.

PeopleSoft Technical: Pages


Page Controls

There are three types of controls that are available to use on a page:
  • Aesthetic controls
  • Data entry controls
  • Function and data processing controls

Aesthetic Controls

Aesthetic controls are the controls that allow you to make the page look the way you want, organize it the way you would like, and give messages out to the user of the page with text. Aesthetic controls are not associated with data in the database; they are only used on a one-time basis on a page to give the look and feel you would like. They do not relate back to a record nor do they change the property for reuse on other pages. Aesthetic controls are described in the
following sections.
  • ChartChart frame is a placeholder on the page drawn as a box during design and during runtime using PeopleCode. The chart will be populated with the GetChart field type.
  • FrameThis control draws a frame around a group of controls. A frame will also help you isolate controls, which will become clearer when you learn how the processing occurs on pages and components. When a frame with HTML is displayed on the Web, it will create an HTML table.
  • Group Box
    A group box is a box that you draw around a group of items and give a text label to.
  • Horizontal Rule
    A horizontal rule is a horizontal line that can be drawn on a page to separate items on a page; horizontal lines are not for functionality, but for creating a visual separation on the page.
  • Image
    An image allows you to create a frame that can be associated with one of two types of images—a standard Image type field or an ImageReference. An ImageReference can change dynamically during runtime and while the page is displayed. You can use a dynamically changing image to convey information to the user during runtime.
  • Static Image
    A static image is a frame that is associated with a non-changing image. A static image is just what the name implies and it does not change during runtime. It is not associated with a record field but an image definition.
  • Static Text
    Static text can be used to give users instructions on the page. Static text can be any text that does not change on the page. If your text will change, it is best to store it in a message catalog or in HTML rather than in static text.

Data Entry Controls

The data entry controls allow you to choose the way that the data will be entered, manipulated, and/or controlled on the page.
  • Check Box
    A check box is a toggle switch and represents in code an on or off, or Boolean function. It is for representing a yes/no, on/off, or 1/0 type of coding.
  • Drop-Down List Box
    The drop-down list box is a data entry feature that allows for a single value to be chosen from a list of valid values. It is best to have three or more values to choose from; otherwise, it is over-coding to use a drop-down list box.
  • Edit Box
    An edit box is used for data entry—any value can be placed in the edit box. Edit boxes are also used for data display; you can display values in fields, derive work records, and/or translate text fields and then make the edit box read-only. The data type for an edit box is text so you want to use an edit box to allow for data entry into a record that has a field that is a character, number, signed number, or date.
  • Long Edit Box
    A long edit box is almost the same as an edit box; the difference is in size. If your field is a long value a scroll area is added to the edit box, allowing for scrolling through the text. The length is controlled by the contents rather than the size of the field. Common uses are for comments and descriptions. Long edit boxes are good for memo type entries and generally correspond to the “long character” type fields in the database.
  • Radio Button
    Radio buttons are small round buttons representing a single value that has multiple options. You add radio buttons in groups to show the multiple options that a single value has. PeopleSoft recommends using radio buttons in cases with very few options; for more than a few options, they recommend the use of a drop-down list box. The reason is that drop-down lists will grow dynamically as more choices are introduced, whereas when adding radio buttons the page would need to be modified.
  • Subpage
    A subpage can represent a single source for a page header and you can reuse it on multiple pages.

Function and Data Processing Controls
Function and data processing controls allow for creating separation of levels on your page.
  • Grid
    A grid allows you to place an object that behaves like a spreadsheet on your page. It has headings and cells, and can have push buttons, links, tabs, and more to allow for any type of navigation. A grid is similar in appearance to a scroll area and can be used instead of a single-level scroll area. Grids allow for the display of one-to-many relationships.
  • HTML Area
    The HTML area gives you as a web designer an HTML object to insert onto a PeopleSoft page. This will provide you with all of the functionality of HTML inside of your PeopleSoft page. All standard HTML code can be written and called to in this object. Take a look at these illustrations. One shows the design of the HTML area; in the second, you can see how to call HTML object in PeopleCode.
  • Push Button/Hyperlink
    The push button is the basic element on any page design. You can have the push button fire off PeopleCode or go to a hyperlink. It is one of the simplest objects, but can contain some of the most complex code. Here is a basic push button defined in Application Designer.
  • Scroll Area
    A scroll area is very similar to a grid. It allows for easy navigation through rows using push buttons. Where the two differ is that in a grid you are limited to the types of controls you can place in it, but in a scroll area there is no limit. You can even place a scroll in a grid. The links and buttons that are defined in the scroll area are defined in the navigation bar. Within the navigation bar you have other settings: Find for searching, and View All so all the rows can be seen at once. Scroll areas also allow for random placement of fields; they can be side by side or one on top of another.
  • Scroll Bar
    Scroll bars contain buttons and links for navigation, but instead of forming an area of data, the scroll bar creates a customized navigation bar. The developer must customize all navigation items and place them on the bar. The bar itself will not appear during runtime; the items that are placed on it display.
  • Primary Scroll Record
    The primary scroll record directly relates to the SQL table and/or view that is connected to the page via the scroll levels. Each page can have only one primary scroll record, and it cannot be repeated in more than one scroll area on the same level. The parent/child relationship between the primary or parent scroll record will determine the structure of the other scroll areas on the page. Level 1 is the child to the parent, or Level 0, record. The child record, or Level 1 record, encloses what is on level 0, and Level 2 encloses what is on Level 1, and so on. It is important to note that Level 0 can have multiple records. The relationships from the primary record to the children records allow for the drill-down effect on a page.
  • Component BufferComponent buffer, is simply an area in memory that allows you to place data that is active in the component, or in simpler terms, the current record. There are two ways to refer to data that is in the component buffer: using a scroll path or using PeopleCode with RowSet. The fields that display data for the page controls and the rows of data associated with them are stored in the component buffer. One of the fields that contain data would be the primary scroll record. You can access the primary scroll record and direct movement through the available data with PeopleCode.
  • Secondary Page
    A secondary page is a control that is invisible at runtime. It allows you to associate a
    secondary page with the primary or parent page. You then use a command push button or link to redirect the control to the secondary page as a pop-up page. The secondary page is used to gather data and/or display data that is not used as often as the main parent page. You use the DoModal PeopleCode function to display the secondary page.

July 14, 2009

PeopleSoft Technical -Part II


HTML


With Derived Records you can display an HTML object on a PeopleSoft page.
  1. Create a new HTML object and put your HTML code in the blank object screen.
  2. Create a Derived Record to store the HTML Field.
  3. Create a Page with an HTML Object area on the page.
  4. Set the HTML Object Properties.
  5. Set the Field Formula Property of the HTML Object.
  6. Add a page to a component.
  7. Add a component to a menu.
  8. Add a component to a portal.
  9. Configure Content Reference Administration.
  10. Add a component to a permission list.
  11. Register the Component, Menu, and the Permission List in the Registry Wizard.
  12. View your Hello World Page.
  • Unable to add a component to a permission list ? .... Try using public
Message Catalogs
PeopleSoft error messages are maintained by set number and are all stored in the Message Catalog.You add and maintain system messages using the Message Catalog page. PeopleSoft reserves all message set numbers up to 20,000. To add a message set:
  1. Go to PeopleTools | Utilities | Administration | Message Catalog, and on the search page click Add New Value.
  2. Enter the value of the new Message Set Number and click Add.
  3. Enter a Description, a Short Description, and a Message.
  4. Save.
To add a message to a Message Set:
  1. Open the Message Set.
  2. Click the plus sign button to add a new row.
Query Manager
The Query Manager gives you a useful GUI interface to create customized queries. You can create a nice end-user layer with trees to keep a tight handle on the security within the queries. Unless the record you are accessing in the Query is in the tree that you have the permission for, you will not be able to see the results of the query.
  • One of the main features of the Query Manager is that it will automatically join the Effective Date and Effective Sequence for you properly, so if you are new to PeopleSoft and having a hard time getting your queries properly written, use the Query Manager to help create the queries you need.
  • You also get the added advantage in your queries of running them and dropping the results into Excel. This is a nice feature: you can convert your ad hoc queries into queries in the Query Manager, give your customers access, and allow them to run them on demand and put the results into Excel.
  • Users can have the permission (depending on what the security administrator has given them) to save their queries, modify existing queries and save them under a different name, and delete queries.

July 13, 2009

PeopleSoft Technical -Part I


Application Designer
Application Designer is an interactive and easy-to-use rapid application development tool. It provides an integrated development environment that allows you to work with several definitions stored in a Project container in one single work area. Application Designer is the main development environment for PeopleSoft.
Any object created is defined both in metadata and the database. The Object Definition and Object will not respond if PeopleSoft metadata repository and physical database object do not match. When building objects in PeopleSoft, you must always keep in mind that they have to be defined and removed from two places: the physical database level and the metadata repository.

PeopleCode
PeopleCode is the programming language delivered by PeopleSoft for the customization of the PeopleSoft Application.

There are two types of PeopleCode available to you as a Developer: PeopleSoft Component Interface PeopleCode, fired off by an object like a button on an event, and PeopleSoft Application Engine PeopleCode. It is important to understand that PeopleCode is the language that is written via the Application Designer interface. PeopleCode is a PeopleSoft proprietary language that is object-oriented.

SQR
Structured Query Report Writer is a PeopleSoft-delivered reporting tool(3rd Party Tool). SQR has a robust report-writing environment with complex procedural logic built in.
You can combine database retrieval and row processing. You can even embed PL/SQL in your reports and do complex database manipulation.

Application Engine
Application Engine is a batch processing tool.
Application Engine is different from regular batch programs in that it is not procedural. It focuses on set-based SQL logic and goes to a much deeper level of the underlying application definitions.
Note:
1) Why would Application Engine show up as part of Oracle Fusion?

a) Oracle doesn’t have a good tool for batch development.
b) Application Engine fits well within Oracle as it is a set-based tool.
2) SQR also has the advantage of being a little bit more independent of the applications.
3) SQR has zero understanding of the underlying applications that it’s working with. Trees, effective dating, setids, row-level security, related language records, etc. all have to be coded by hand when you’re writing SQR code
4) Aside from being a very PeopleSoft-specific tool, App Engine lacks any kind of built-in output capability.

Meta-SQL
“Meta-SQL” is a PeopleSoft extension of SQL that converts to correct SQL code.
Meta-SQL expands to platform-specific SQL substrings and then causes another function to be called, or substitutes a value. Meta-SQL constructs are used in functions that pass SQL strings, such as SQLExec.

Fusion Middleware Tools
Oracle Fusion Middleware is a comprehensive middleware family composed of SOA and middleware products. When used in conjunction with Oracle Fusion Middleware Enterprise Portal, PeopleTools is designed to serve as a point of access for all enterprise applications.

XML Publisher
XML Publisher, called BI Publisher in the Oracle Application world, handles the data formatting and output and has recently been integrated with PS/Query and PeopleCode, which makes it accessible from Application Engine. It’s not a big stretch to see how Application Engine could be enhanced to use BI Publisher natively as an output tool and effectively get rid of the need to use SQR at all.

Oracle Business Intelligence Publisher (BI Publisher, formerly XML Publisher) is an enterprise reporting solution to author, manage, and deliver all types of highly formatted documents eliminating the need for costly point solutions. Built on open standards, IT staff and developers can create data models against practically any data source and use BI Publisher APIs to build custom applications leveraging existing data sources and infrastructure. End users can easily design report layouts using familiar desktop tools, dramatically reducing the time and cost needed to develop and maintain reports. Extremely efficient and highly scalable, BI Publisher can generate tens of thousands of documents per hour with minimal impact to transactional systems. Reports can be viewed online or scheduled for delivery to a wide range of destinations.

Definitions in PeopleSoft Application Designer
In the Application Designer you will define the metadata definition as well as allow the tool to build the SQL that can be submitted to your DBA to build the physical database object. Always
be cognizant that the two objects must match in every aspect: size, type, decimal places, and format. If they do not match in every aspect, you will receive an unknown object definition error via the PeopleSoft PIA.

Fields
Fields are the lowest-level definition in PeopleSoft. Fields have the following attributes:
  • Type
  • Length
  • Decimal places (if a number type)
  • Translation values (optional)
  • Long name
  • Short name
  • Format
Available field types include
  • Character
  • Long Character
  • Number
  • Signed Number
  • Date
  • Time
  • Datetime
  • Image
  • ImageReference
  • Attachment
    1) The attributes for fields are stored in the database table PSDBFIELD, which is a metadata catalog table that is populated when a field is created or changed in the PeopleSoft System
    2) The catalog table PSDBFIELDLANG stores the long and short descriptions in multiple languages.
    3) To see fields that are used in Record definitions, look at the catalog table PSRECFIELD.

    Records
    • A collection of fields is a record definition.
    • A record can be a table (SQL table or Temporary table), view, subrecord, derived work record, query view, or dynamic view.
    • Tables and views would exist in both the PeopleSoft metadata and the physical database; the other types of records are only available via the PeopleSoft metadata.
    • Record definitions are stored in the metadata catalog table PSRECDEFN which stores the attributes for the records. It holds the properties of the record definition.These properties are of three types: General Properties, Type Properties, and Use Properties.
    • General Properties of a Record have the following attributes: Description, Record Definition, Owner ID, Last Updated Date/Time and Last Updated By User.
    • Type Properties of a Record have the following attributes: Record Type and Non-Standard SQL Table Name.
    • Use Properties of a Record have the following attributes: Set Control Field, Record Relationships(Parent Record, Related Language Record, Query Security Record, Optimization Delete Record), Record Audit, Audit Options(Add, Change, Selective, Delete) and Record-Level Auto-Update(System ID Field, Timestamp Field)
    • PSRECDEFN holds table space name in the SQL Table definition. Each record that is a SQL table and was delivered by PeopleSoft is stored with a prefix of PS_; a table that is created in PeopleTools will be named with the PS_ convention except when the name is defined in the Non-Standard SQL Table Name field in the configuration.
    • Set Control Field is the property that is used in a multi-company environment to share records across company databases. In order to do this, PeopleSoft delivered SETID field needs to be defined as the first field in the record definition as a Search Key.
    • Parent Record: Parent/Child definitions and relationships help create automatic joins for use in the PeopleSoft Query Tool,
    • Related Language Record setting is used in the case of multilingual application, and this setting brings that functionality down to the record level.
    • Query Security Record setting is available for PeopleSoft Query. This setting will provide row-level security for the record definition.
    • Record Audit: The audit flag if turned on in the record definition will record all inserts, updates, and deletes in an audit table. PeopleSoft will create a trigger at the database level that will write these transactions off to a table. This will allow you as the developer to know who updated, deleted, and/or added records as well as when (time and date) that was done.
    • Record Field Properties: PSRECFIELD stores the fields that are contained in the record definition. Within the PSRECFIELD table is a column USEEDIT, a 32-bit integer field. The following shows the basic settings:
    • Translate Values: Translate tables allow you to create prompt tables or list boxes that have predefined values for your users to choose from. This will make data entry quicker and more accurate. The rules for the data that you need to follow when creating a translate table are as follows:follows:
      a) Field type is Character.
      b) Field length is 1 to 4 characters.
      c) Field values consist of a relatively small, static set of values that are not maintained by the user.
      d) No other fields relate to this field.
    • A Derived Work Record is primarily used to store temporary data, data that
      do not need to be reused. One of the main functionality of a Derived Work Record is to store totals.
      Another common use is for buttons, messages, and temporary fields. Derived Work records are only available during your session with the page and are reset anytime the page is re-entered.
    • Subrecord Is used for SubPages and creates the one-to-many relationship.
    • Dynamic View Are views that are recreated dynamically with each use.
    • Query View Are used to define the record as a view using the PeopleSoft Query Tool.
    • Temporary tables Are used for running PeopleSoft Application Engine batch processes.
    Pages
    The main graphical representation of the data on the web via the PeopleSoft application is through a page. Pages represent the data in your tables; they display the fields, columns, and rows in the database. They are used to view, update, and enter data in the application database.
    • One of the important elements in your page creation is to determine the mode in which you wish to handle the processing of the data back to the server(App Server -> DB Server). There are two choices for processing modes:Deferred mode and Interactive mode.
    • Most of the PeopleSoft-delivered components run in deferred processing mode; this mode reduces the need for the application to have increased interaction with the server and reduces the number of calls, leading to increased performance. Each trip to the server will refresh the browser page, and too much interaction can lead to screen flicker and slowing down the application.
    • If a component is using deferred-processing mode, pages and fields within that component can be made interactive on an individual basis (by unticking the "Allow Deferred processing" box). However, if a component is interactive, then all pages and fields on that component are interactive as well.
    • The page action options are directly related to the actions you can perform on data. The available options are limited to the type of data row that you are trying to retrieve, modify, insert, or update. The rules that are directly linked to effective date are Include History and Correct History actions.
    • PeopleSoft pages have three essential types of elements that you can use to design your pages: basic aesthetic elements, for example, lines and pictures; functional elements, which include buttons and links; and data-entry elements, including check boxes and radio buttons. The following are the common elements used in a PeopleSoft page.
      Frames Allow you as a Developer to draw a frame around a set of elements and create a group from them. These are display-only boxes that create a grouping of fields on a page.
      Group boxes Similar to frames, but they allow for text labels. They group and identify related fields.
      Horizontal rules Horizontal lines that are display only.
      Images Unchanging graphics on your page; an example would be your Company logo.
      Text Static text that is unchanging and can give a set of instructions on a page.
      Check boxes These directly correspond to the capturing of data entry for an on/off, yes/no field. A check box has only two options.
      Radio buttons Similar to check boxes but allow for a set of options to be chosen in the collection of data entry.
      Buttons A button can perform a number of actions, calculate a value, and refresh the fields on the page, open a new page, and help with navigation in the application. Buttons are very dynamic and can be coded to do a variety of actions and navigations.
      Links Can redirect the navigation to a new site outside or inside of PeopleSoft.
      Edit boxes Allow for data entry. They directly correlate to the field in the database; any limits on type and size are defined by the field. Edit boxes with spell check enabled will display a spell check button.
      Long edit boxes Are the same as edit boxes, but they allow for the data entry of longer character strings.
      Drop-down list boxes Allow for the selection of a data item for entry from a predefined list.
      Grids Grids are spreadsheets on the PeopleSoft page; they allow for the display of one to many relationships on PeopleSoft pages.
      Scroll areas These are similar to grids, but the data is displayed in a free-form manner—not in a spreadsheet-type display. Both grids and scroll areas allow for the sharing for key data into each new row that is created. These keys become important in the creation of scroll levels in the component and can cause problems with sharing of data between multiple levels.
    Components
    A component is derived from several pages and defines the way that the page will behave in the Internet browser. It is also where you define the pages that display as tabs across the top of the page. The component is based on the page and the properties that define the way that the page will be displayed in the browser.

    Menus
    Menu Name needs to be created in Application Designer and PeopleTools->Portal->Structure and Content are used to create a Menu.

    Roles and Permission Lists
    Permission and security are tied to the page through the component and menu. Menu
    under the Page tab is defined in the Permission List object. A role is defined as one or more permission lists, and a permission list is defined as access to one or more pages via the component.

    July 12, 2009

    PeopleSoft Technical: Hints/Tips

    1. Make sure the system maintained check mark is checked OFF on the record field properties of AUDIT_ fields while creating AUDIT Record.

    2. %DateDiff(from_date,to_date) gives date difference in days and %DateTimeDiff(from_datetime,to_datetime) gives date difference in minutes
    Note: "abs(days(to_date) - days(from_date))" can also be used.
    This also takes Leap Years into consideration.

    3. How to unlock an User Profile from database ?

        UPDATE PSOPRDEFN SET ACCTLOCK = 0

    4. The SetEditTable method works with the ExecuteEdits method. It is used to set the value of a field on a record that has it's prompt table defined as %PromptField value.
    -%PromptField values are used to dynamically change the prompt record for a field.
    -
    Use SetEditTable to dynamically set the prompt table.

    5.
    SendMail(&FLAGS, &TO, &CC, &BCC, &SUBJECT, &TEXT, &FILES, &TITLES);
    -&FLAGS = 0

    6. PeopleCode can be commented using rem, remark, /*....*/, <*.....*>.

    7.
    Skip a Search Record prompt when you know the keys using PeopleCode function SetSearchDialogBehavior in SearchInit PeopleCode.
    SetSearchDialogBehavior(0) -skip if possible
    SetSearchDialogBehavior(1) -force display

    8. Renaming a Tree
    If you are adding or inserting nodes into a tree using the PeopleSoft Tree Manager, and you get an error that reads, "Unable to Insert (25,14), then you need to take one or both of the following steps:
    1. If the tree contains branches, you may need to unbranch one or more branches. If you are trying to insert below the last node in the branch you are editing, you must unbranch the branch node that you are trying to insert below.
    2. You may need to renumber the tree's internal node numbers by running the SQR named PTUGAPTR.SQR
      
    9. Import data to Populate the Dept Sec Tree
    Use Import Manager to import the data into the R_PER507 record delivered by PeopleSoft. Once you upload the external data into this table you can use the PS delivered SQRs (PER507, PER508, PER509, and PTUGAPTR) to load both the Department record and security tree.


    10. Tree Mover Utility provides a facility for migrating trees from one database to another.Run the tmdownld.sqr to export the desired tree contents into a flat file. After you complete this task, you can import the flat file into version 8 using the tree mover utility.
    Note: This can be done using different source and target versions of PeopleSoft. For example if you want to migrate tree data from 7.5 PS to 8.x PS, you can use this method.
     

    11. Debug apps by Writing variables to a file
    &MYFILE = GetFile("debug-file.txt", "W");
    If &MYFILE.IsOpen Then
    &MYFILE.WriteLine("Here is my First Variable");
    &MYFILE.WriteLine(&MyVariable);
    &MYFILE.WriteLine("Here is another Variable");
    &MYFILE.WriteLine(&MySecondVariable);
    &MYFILE.Close();
    End-If;
    Note:
    PeopleSoft freaks out when you try to call a winmessage from FUNCLIB PeopleCode

    12. Import/Export Security
    PeopleTools provides a set of DataMover scripts to EXPORT and IMPORT your security. The provided scripts transfer User Profiles.
    USEREXPORT.DMS : Exports User Profiles from source database and stores them in a dat file. The output file is named USEREXPORT.DAT
    USERIMPORT.DMS : Reads the file created by USEREXPORT.DMS and copies theUser Profile data into the target database.
    Note: To Export Permission Lists and Roles from source to target, useApplication Designer to copy Permission List and Roles objects from source to target database.
    The EXPORT/IMPORT scripts export and import ALL security tables (all UserProfiles, Roles, and Permission Lists). The USEREXPORT/USERIMPORT scripts export and import ALL User Profiles. From Application Designer, you can only copy Roles and Permission Lists (not User Profiles). The scripts are for use in situations where you need to move all the security from one database to another. Use Application Designer if you just need to copy a few select Roles and/or Permission Lists between databases.
    When migrating security between databases you may want to make sure that the SYMBOLIC ID, AccessID and Access Password in the source and target database are the same, this makes for little headaches. You can always change the AccessID password or create a new Symbolic ID in the target once the migration is done.

    13. PeopleCode: Manipulate ActiveX controls in PeopleCode
    In PeopleSoft 8, you can place an ActiveX component on a page, save it, and then manipulate the ActiveX control from within your PeopleCode events.There are two peoplcode events titled PSControlInit and PSLostFocus.
    The PSControlInit event fires each time a page is redrawn.
    The PSLostFocus event fires each time a user tabs off of the ActiveX control.



    14. Special note on Effective Dated Panels
    With a few minor exceptions such as Payroll Processing that are usually done as batch processes, effective dated records in PeopleSoft are designed to keep a record of when information changes. In most instances, if you insert a new row into an effective dated panel and attempt to save without changing any values, the new row will not be saved to the database. This is because the new effective date (and possibly other values) have defaulted in and default values do not cause a new row to be saved, even though the save button may have become highlighted.
    This is not a bug; it is how the system was designed. Generally, there is no reason to store a new row if no data changes. In situations where there are business reasons for storing rows that are identical except for the effective date, the panels have been coded so that the values are assigned rather than defaulted, but these panels are a tiny minority of the effective dated panels.

    15. Scheduling a Process in PeopleCodeHere is a great example of how to schedule a process and email the results from within PeopleCode. You can do this within an App Engine Program or even by placing a push button with FieldChange peoplecode.
    --------------------------------------------
    Local ProcessRequest &RQST;
    Local string &Subject;
    Local string &Text;
    &Subject = "Subject of Email";
    &Text = "This text will be displayed as the text of this email ";
    &RQST = CreateProcessRequest();
    &RQST.RunControlID = "MYRUNCONTROL_ID";
    &RQST.ProcessName = "PROCESSNAME";
    &RQST.RunLocation = "PSNT";
    &RQST.ProcessType = "SQR";
    &RQST.OutDestType = "Email";
    &RQST.OutDestFormat = "PDF";
    &RQST.OutDest = "User : PS,Role : PeopleSoft User";
    &RQST.EmailSubject = &Subject;
    &RQST.EmailText = &Text;
    &RQST.EmailAttachLog = False;
    &RQST.Schedule();
    ---------------------------------
    -> For Left Padding in PeopleCode, try Rept('0','length').
    -> "^" - shortcut for field reference.