describe_component
describe_component shows how a component is put together: its pages and search record, the
records on those pages, where it appears in navigation, and the PeopleCode that runs in it,
grouped by event in the order the Component Processor fires them. It’s the starting point for
questions about how a page actually behaves.
Use it for
Section titled “Use it for”- “Which PeopleCode runs when a user saves the Job Data component, and in what order?”
- “What pages are in ZZ_TRAINING_REQ, and which records do they use?”
- “Where is this component in the menu?”
| Argument | Type | Required | Description |
|---|---|---|---|
component |
string | Yes | The component name, such as JOB_DATA. Up to 18 characters. |
market |
string | No | The market. Default: GBL. |
include_peoplecode |
boolean | No | List the PeopleCode programs that run in the component. Default: true. |
{ "type": "object", "properties": { "component": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]{0,17}$", "description": "Component name, for example JOB_DATA" }, "market": { "type": "string", "pattern": "^[A-Za-z0-9]{3}$", "default": "GBL", "description": "Market, for example GBL" }, "include_peoplecode": { "type": "boolean", "default": true, "description": "List the PeopleCode programs in the component" } }, "required": ["component"], "additionalProperties": false}Output
Section titled “Output”| Field | Description |
|---|---|
component, market |
The component and its market |
description |
The component’s description |
searchRecord |
The search record |
addSearchRecord |
The search record for Add mode, when it’s different |
pages |
The pages, in order, each with name, label, and hidden when the page is hidden |
records |
The records on the component’s pages, including subpages |
navigation |
Navigation entries that open the component, each with label and path |
menus |
Menu registrations, each with menu, bar, and item |
peoplecode |
PeopleCode programs, grouped by event in firing order (see below) |
lastUpdated, lastUpdatedBy |
When the component definition last changed, and who changed it |
Each peoplecode entry has the event, the level it’s defined at, and the record, field, or
page it’s attached to. It also has a path in the format that
get_peoplecode accepts. The levels are
record field, component record field, component record, component, and page.
Events are grouped in the order the Component Processor fires them:
- Building the component: SearchInit, SearchSave, RowSelect, PreBuild, FieldDefault, FieldFormula, RowInit, PostBuild, Activate
- While the user works: FieldEdit, FieldChange, RowInsert, RowDelete, PrePopup, ItemSelected
- Saving: SaveEdit, SavePreChange, Workflow, SavePostChange
{ "component": "ZZ_TRAINING_REQ", "market": "GBL", "description": "Training Request", "searchRecord": "ZZ_TRAIN_SRCH", "pages": [ { "name": "ZZ_TRAIN_REQ", "label": "Request" }, { "name": "ZZ_TRAIN_APPR", "label": "Approval", "hidden": true } ], "records": ["ZZ_TRAIN_REQ", "ZZ_TRAIN_APPR", "ZZ_TRAIN_WRK"], "navigation": [ { "label": "Training Request", "path": "Manager Self Service > Training > Training Request" } ], "peoplecode": [ { "event": "RowInit", "level": "record field", "record": "ZZ_TRAIN_REQ", "field": "ZZ_TRAIN_STATUS", "path": "ZZ_TRAIN_REQ.ZZ_TRAIN_STATUS.RowInit" }, { "event": "FieldChange", "level": "record field", "record": "ZZ_TRAIN_REQ", "field": "COURSE", "path": "ZZ_TRAIN_REQ.COURSE.FieldChange" }, { "event": "SavePreChange", "level": "component", "path": "ZZ_TRAINING_REQ.GBL.SavePreChange" } ]}How it works
Section titled “How it works”The tool reads these tables, with the component and market as bind variables:
| Part of the result | Table | Notes |
|---|---|---|
| Header | PSPNLGRPDEFN |
DESCR, SEARCHRECNAME, ADDSRCHRECNAME |
| Pages | PSPNLGROUP |
In SUBITEMNUM order, with ITEMLABEL and HIDDEN |
| Records | PSPNLFIELD |
For every page, expanding subpages (SUBPNLNAME) recursively |
| Navigation | PSPRSMDEFN |
Content references whose PORTAL_URI_SEG2 and PORTAL_URI_SEG3 match |
| Menus | PSMENUITEM |
Menu items whose PNLGRPNAME is the component |
| PeopleCode | PSPCMPROG |
Component-level programs, plus record field programs on the records it uses |
SELECT DISTINCT F.RECNAME FROM PSPNLGROUP G JOIN PSPNLFIELD F ON F.PNLNAME = G.PNLNAME WHERE G.PNLGRPNAME = :component AND G.MARKET = :market AND F.RECNAME <> ' 'Controls that aren’t bound to a record, such as static text and frames, have a blank RECNAME,
which PeopleSoft stores as a single space. Subpages appear as rows with SUBPNLNAME filled in, and
the server runs the same query for each subpage.
Component-level programs are keyed by the component (10) and market (39). What follows the market tells the level: an event (12) straight after the market is component PeopleCode, a record (1) is component record PeopleCode, and a record and field (1, 2) is component record field PeopleCode.
SELECT DISTINCT OBJECTID3, OBJECTVALUE3, OBJECTID4, OBJECTVALUE4, OBJECTID5, OBJECTVALUE5 FROM PSPCMPROG WHERE OBJECTID1 = 10 AND OBJECTVALUE1 = :component AND OBJECTID2 = 39 AND OBJECTVALUE2 = :marketRecord field programs on the component’s records use the record (1), field (2), and event (12) key path, with one bind variable per record:
SELECT DISTINCT OBJECTVALUE1 AS RECNAME, OBJECTVALUE2 AS FIELDNAME, OBJECTVALUE3 AS EVENT FROM PSPCMPROG WHERE OBJECTID1 = 1 AND OBJECTVALUE1 IN (:rec1, :rec2, :rec3) AND OBJECTID2 = 2 AND OBJECTID3 = 12Page programs, such as Activate, use the page (9) and event (12) key path. The
PeopleTools metadata primer
lists every key path.
Limits and errors
Section titled “Limits and errors”- The tool lists the programs that run in the component, but not their code. Use
get_peoplecodewith an entry’spathto read one. - Records are found through the component’s pages. Records used only in PeopleCode, for example
through
CreateRecord, aren’t listed;search_codefinds those. - PeopleCode that the component’s programs call, such as application classes and functions in other records, isn’t listed.
- A component that doesn’t exist in the given market returns a tool execution error that lists the markets it does exist in, or the closest component names.
Related tools
Section titled “Related tools”get_peoplecodereads a program listed here.get_securityshows who can open the component.describe_recorddescribes the records it uses.find_referencesfinds the components that contain a page.
