Explaining Data Flow in PeopleSoft Pure Internet Architecture (continued

This diagram displays the flow of an application in the PeopleSoft Pure Internet Architecture:

A TableSet is a group of rows in a control table identified by the same high-level key: TableSetID or the SETID field. All control tables used in TableSet sharing have the SETID field as the highlevel key, as shown in this diagram:

Implementing TableSet Sharing The technical tasks for implementing TableSet sharing comprise five steps: Steps one through four address the record definition. Step 5 addresses the page definition.

1. 2. 3. 4. 5.

Add BUSINESS_UNIT to a transaction table or SETID to a control table. Define the Set Control Field in the control table. Create or alter the table. Add PeopleCode to the business unit table. Alter the page.

The following diagram shows the process for implementing TableSet sharing. . you will need to do step 2 and define the Set Control Field in the Record Properties dialog box. Message Sets Each message within a message set contains these elements:     Message number.Defining the Set Control Field If creating a control table. Explanation. Most often you select BUSINESS_UNIT in the Set Control Field drop-down list box. Severity. Message text.

<MessageNum>. For example. PSU_CRS_SESSN. The MsgGet function in PeopleCode is used in conjunction with message delivery functions such as Error or Warning to retrieve a message and display it to the user. 3. you use a bind variable with the MsgGet function. The syntax is: MsgGet(<MessageSet>.END_DATE. when the Message Catalog string: Course start date (%1) must not be later than course end date (%2). bindvar>])."DefaultMsgTxt".END_DATE) End-If. PSU_CRS_SESSN.START_DATE. "Message Not Found: Course Start Date must not be later than End Date. . Then %1 is replaced in the text string by the value in PSU_CRS_SESSN.Retrieving Messages You retrieve messages from the Message Catalog using PeopleCode functions.". [<bindvar.START_DATE. Creating Error Messages Using the Message Catalog (continued) Bind Variables To combine field values with message text in the Message Catalog. Is called by the PeopleCode statement: Error MsgGet(1040. and %2 is replaced by PSU_CRS_SESSN.

Component Build and Page Display Events The component build and page display events are: • • • • • • • RowSelect PreBuild FieldDefault FieldFormula RowInit PostBuild Activate . Syntax: SetTracePC(n) The following example will turn on trace with Show Assignments to Variables and Show Fetched Values SetTracePC(4+8).Exploring More Development Tools (continued) SetTracePC You can run a PeopleCode trace from within a PeopleCode program using the SetTracePC PeopleCode built-in function. Turn off the trace by calling SetTracePC with a parameter value of zero.

Do not place errors or warnings in FieldFormula except within a function. RowSelect PeopleCode is placed on a record field or component record. Do not place errors or warnings in RowInsert • • Error statements prevent a row from being deleted.Use RowSelect to: • • Prevent a row from loading by using the DiscardRow function. Warning statements allow the user to accept the Row Delete (OK). such as enabling a field or hiding a scroll. while RowInit code executes once for every row. in this event. • • • Put PeopleCode related to page display or page processing. Stop loading rows into the buffer by using the StopFetching function. Do not place errors or warnings in RowInit because it occurs only once. Do not place errors or warnings in Activate. Use this event for security validation. or cancel the Row Delete (Cancel). Warnings and errors can be placed in RowSelect but will not be displayed to the user and are not used for that purpose in this event. Do not place errors or warnings in SavePostChange. . Save Action Events The save action events are: • • • • SaveEdit SavePreChange Workflow SavePostChange Use error and warning statements in SaveEdit to validate data Do not place errors or warnings in SavePreChange. Do not place errors or warnings in FieldDefault.

MessageBox(style. Explaining Message Catalog Functions (continued) MsgGetText and MessageBox Two other functions that can be used to retrieve messages from the Message Catalog include MsgGetText and MessageBox. . MsgGetText(message_set. but provides the flexibility to change the severity of a message through the Message Catalog. Use PreBuild to hide or unhide pages and to set component and global variables. perform calculations and to set component and global variables. Use PostBuild to hide or unhide pages. default_txt [. Use RowInit PeopleCode to initialize field display characteristics or to perform calculations on rows of existing and on newly inserted rows of data. paramlist]) MsgGetText is very similar to MsgGet except the message set and message number will not appear after the text of the message. message_num. without modifying PeopleCode. Use FieldDefault to assign default values to empty fields.field_name event_name. default_txt [. MessageBox retrieves messages from the Message Catalog. paramlist]) Declare Function function_name PeopleCode record_name. Use Activate set the display characteristics specific to a page. Use FieldFormula only to store function libraries or Web libraries. you learned that: • • • • • • • • There are seven component build and page display events. message_set. message_num. title.In this lesson. RowSelect can be used to filter out rows of data from the component.

Step 7. Step 4. Get the level 0 row. Get a level 1 rowset. Step 2.Traversing the Data Buffer (continued) Steps The steps to traverse the component buffer from level 0 to level 1 are: Step 1. Step 1 Declare data buffer objects Local Local Local Local Rowset Row Record Field &RS_Level0. &Row_Level1. &ROW_LEVEL0 = &RS_Level0. Step 5. Step 3. Get a level 1 row. Get the level 0 rowset. Declare data buffer objects. &RS_LEVEL1 = &ROW_LEVEL0.GetRowSet(SCROLL. Get the level 0 row. Step 2. &Rec_TaskRsrc. &Row_Level0.PSU_Task_RSRC). Traversing the Rowset Step 4. Get a level 1 field. Get a level 1 record.GetRow(1). Get the level 0 rowset &RS_LEVEL0 = GetLevel0(). . Step 3. &Fld_PctAvail. Get a level 1 rowset. Step 6. &RS_Level1. Get a level 1 row. Step 5.

Value.GetRow(n) &Row. &REC_TASKRSRC = &ROW_LEVEL1. = &Row_Level1. Get a level 1 field. Source Object Rowset Row Row Record Return Default Method s Row &RowSet. Fieldname. .recname) Row Field Shorthand Notation &RowSet(n) &Row.recname) (n) &Record.PSU_TASK_RSRC).fieldname) Record &Row.fieldname You can string together dot notation to form a single statement.GetRecord(RECORD. &RowSet.Pct_Available.&Row_Level1 = &RS_Level1.recname(n) &Record.recname &Row.GetRowset(SCROLL. row.PCT_AVAILABLE). &Fld_PctAvail.Value. Step 6. and record classes. For instance.Sort(Fieldname.PSU_Task_RSRC. Step 7. the following four lines &Row_Level1 &Rec_TaskRsrc &Fld_PctAvail &Pct = = &RS_Level1(&I).GetField(FIELD. "A|D"[. = &Rec_TaskRsrc.PSU_Task_RSRC. "A|D"]). Get a level 1 record. can be combined into a single statement: &Pct = &RS_LEVEL1(&I). Using Shorthand Dot Notation Default Methods Here are the default methods for the rowset.GetRow(&I). &FLD_PCTAVAIL = &REC_TASKRSRC.Pct_Available.GetField(FIELD.GetRecord(SCROLL.

It is used the same as SelectByKey. . or an assignment statement. just use a SQLExec. Step 1 Declare data buffer objects .DML statements can only be issued in FieldChange (as of 8. SelectByKey The SelectByKey method selects one row of data based on the key values provided. Fetch For a SQL object containing a Select statement. so that more than one row would be retrieved. You use SelectByKeyEffdt to select the current row from a table. If you are only retrieving one row.4). but takes a date as its argument.Fetch(bind_values) • • • • Fetch takes as its argument output variables to receive values from the Select. typically using an If. Fetch returns as False You must use the Fetch method as part of an expression. &SQL. key2..) SelectByKey will return True on successful completion (which includes returning zero rows) and False if the record is not found. WorkFlow. While.. SelectByKey(key1. and SavePostChange. When there are no more rows. If not all keys are set. the Fetch method is used to retrieve the next row from the cursor. SavePreChange. SelectByKey won’t fetch any data and you won’t receive an error.

Sign up to vote on this title
UsefulNot useful