Skip to content

find_references

find_references answers “what uses this definition?” from the definitions themselves. Given a record, a field, or a page, it lists the definitions that refer to it: the pages that show a record’s fields, the components that use it as their search record, the record fields that use it as their prompt table, and more.

It’s the structural counterpart of search_code, which finds references in the text of PeopleCode and SQL. For an impact analysis, the LLM uses both.

  • “What uses the ZZ_COURSE_TBL record, apart from code?”
  • “Which components contain the ZZ_TRAIN_APPR page?”
  • “Which records and pages have the FEE_AMT field?”
  • “Which public queries would a change to ZZ_TRAIN_REQ affect?”
Argument Type Required Description
type string Yes What name is: record, field, or page.
name string Yes The definition’s name, such as ZZ_COURSE_TBL. Up to 15 characters for a record, and 18 for a field or page.
limit integer No The maximum number of references in each group, from 1 to 500. Default: 100.
Input schema
{
"type": "object",
"properties": {
"type": { "enum": ["record", "field", "page"] },
"name": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_]{0,17}$",
"description": "Definition name, for example ZZ_COURSE_TBL"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"default": 100
}
},
"required": ["type", "name"],
"additionalProperties": false
}

Every result has type, name, and truncated, which is true when at least one group has more references than limit. The other fields are groups of references, and which groups you get depends on the type. Every group is present even when it’s empty, so the LLM can tell “nothing refers to it” from “not checked”.

For a record:

Group What it lists
pages The pages that use the record
searchRecordFor The components that use the record as their search record, each with component, market, and addSearch when it’s the search record for Add mode
promptTableFor The record fields that use the record as their prompt table, each with record and field
subrecordOf The records that include the record as a subrecord
relatedLanguageRecordFor The records that use the record as their related language record
auditRecordFor The records that use the record as their audit record
queries The PeopleSoft Query definitions that use the record (see Queries)

For a field:

Group What it lists
records The records that contain the field, each with record, and viaSubrecord when it comes from a subrecord
pages The pages that show the field, each with page and record
queries The query definitions that use the field, in their output or their criteria

For a page:

Group What it lists
components The components that contain the page, each with component, market, label, and hidden when the page is hidden there
subpageOf The pages that include the page as a subpage
secondaryPageOf The pages with a control that opens the page as a secondary page
Example: type record, name 'zz_course_tbl'
{
"type": "record",
"name": "ZZ_COURSE_TBL",
"pages": ["ZZ_COURSE_TBL"],
"searchRecordFor": [
{ "component": "ZZ_COURSE_TBL", "market": "GBL" }
],
"promptTableFor": [
{ "record": "ZZ_TRAIN_ENRL", "field": "COURSE" },
{ "record": "ZZ_TRAIN_REQ", "field": "COURSE" }
],
"subrecordOf": [],
"relatedLanguageRecordFor": [],
"auditRecordFor": [],
"queries": { "public": ["ZZ_COURSE_LIST"], "privateCount": 3 },
"truncated": false
}

The ZZ_TRAIN_REQ.COURSE.FieldChange program also uses ZZ_COURSE_TBL, through CreateRecord(Record.ZZ_COURSE_TBL). That’s a reference in code, so it isn’t in this result; search_code finds it.

Example: type page, name 'zz_train_appr'
{
"type": "page",
"name": "ZZ_TRAIN_APPR",
"components": [
{
"component": "ZZ_TRAINING_REQ",
"market": "GBL",
"label": "Approval",
"hidden": true
}
],
"subpageOf": [],
"secondaryPageOf": [],
"truncated": false
}

A PeopleSoft Query definition is either public, for everyone, or private to the user who created it. queries lists public queries by name, in public, and only counts private ones, in privateCount, because a private query is stored under its owner’s user ID.

queries is null, meaning not checked, when your administrator hasn’t granted the server access to the query tables. Set up the database account explains this choice.

Each group comes from the PeopleTools table shown, with the name as a bind variable.

For a record:

Group Read from
pages PSPNLFIELD, where RECNAME = :name
searchRecordFor PSPNLGRPDEFN, where SEARCHRECNAME = :name or ADDSRCHRECNAME = :name
promptTableFor PSRECFIELD, where EDITTABLE = :name
subrecordOf PSRECFIELD, where FIELDNAME = :name and SUBRECORD = 'Y'
relatedLanguageRecordFor PSRECDEFN, where RELLANGRECNAME = :name
auditRecordFor PSRECDEFN, where AUDITRECNAME = :name
queries PSQRYRECORD, where RECNAME = :name

A record that includes a subrecord stores it in PSRECFIELD as a row whose FIELDNAME is the subrecord’s name, with SUBRECORD set to Y. That’s why the same table answers both promptTableFor and subrecordOf.

For a field:

Group Read from
records PSRECFIELD, where FIELDNAME = :name and SUBRECORD = 'N'
pages PSPNLFIELD, where FIELDNAME = :name
queries PSQRYFIELD, where FIELDNAME = :name

A field in a subrecord belongs to every record that includes the subrecord. For each record it finds that’s a subrecord (RECTYPE 3 in PSRECDEFN), the server looks up the records that include it, and repeats, up to five levels deep, as describe_record does. Those records come back with viaSubrecord.

For a page:

Group Read from
components PSPNLGROUP, where PNLNAME = :name
subpageOf PSPNLFIELD, where SUBPNLNAME = :name and FIELDTYPE = 11
secondaryPageOf PSPNLFIELD, where SUBPNLNAME = :name and FIELDTYPE <> 11

In PSPNLFIELD, FIELDTYPE 11 is a subpage. Other controls that name a page in SUBPNLNAME open it as a secondary page.

For queries, the server lists public queries, whose OPRID is blank, and counts the private ones. The count comes back as a number, so no user ID leaves the database:

Queries that use a record (Oracle Database)
SELECT DISTINCT QRYNAME
FROM PSQRYRECORD
WHERE RECNAME = :name
AND OPRID = ' '
ORDER BY QRYNAME
Private queries that use a record (Oracle Database)
SELECT COUNT(*) AS PRIVATE_COUNT
FROM (SELECT DISTINCT OPRID, QRYNAME
FROM PSQRYRECORD
WHERE RECNAME = :name
AND OPRID <> ' ') Q

For a field, the same two queries run against PSQRYFIELD, which lists every field a query uses, whether it selects the field or uses it in criteria.

  • The tool finds references in definitions, not in code. References in PeopleCode and SQL, such as SQLExec statements and views, are found by search_code.
  • Only the groups above are checked. Other kinds of reference, such as Component Interfaces, Application Engine state records, trees, and Integration Broker messages, aren’t included.
  • Security isn’t included. get_security shows who can open a component.
  • Each group returns at most limit references, sorted by name, and truncated is true when any group has more.
  • A definition that doesn’t exist returns a tool execution error that lists the closest names of the same type.