# Records

> Browse PeopleSoft record (table) definitions with fields, indexes, related pages, components, PeopleCode, and live data preview.

---

Site [llms.txt](/llms.txt)

---

<div id="pslens-context-panel" class="card border-info mb-4 d-none">
  <div class="card-header bg-light text-info py-2 fw-bold d-flex align-items-center border-bottom border-info-subtle">
    <i class="bi bi-info-circle-fill me-2"></i>
    <span>Tailored Operational Context</span>
  </div>
  <div class="card-body p-0">
    <ul class="list-group list-group-flush">
      <li id="row-db" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Target Database:</strong>
        <span id="ctx-db" class="badge bg-secondary font-monospace">&mdash;</span>
      </li>
      <li id="row-type" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Context Type:</strong>
        <span id="ctx-type" class="badge bg-light text-dark border font-monospace text-uppercase">&mdash;</span>
      </li>
      <li id="row-severity" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Alert Severity:</strong>
        <span id="ctx-severity" class="badge">&mdash;</span>
      </li>
      <li id="row-time" class="list-group-item d-flex align-items-center justify-content-between py-2 d-none">
        <strong>Triggered Time:</strong>
        <span id="ctx-time" class="text-muted small">&mdash;</span>
      </li>
      <li id="row-details" class="list-group-item py-2 d-none">
        <strong id="label-details" class="d-block mb-1">Firing Context:</strong>
        <code id="ctx-details" class="d-block p-2 bg-light border rounded small"
          style="white-space: pre-wrap; word-break: break-all;">&mdash;</code>
      </li>
      <li id="row-sql" class="list-group-item py-2 d-none">
        <div class="d-flex justify-content-between align-items-center mb-1">
          <strong id="label-sql">Contextual SQL:</strong>
          <button id="btn-copy-sql" type="button" class="btn btn-sm btn-outline-secondary py-0 px-2 small">
            <i class="bi bi-clipboard me-1"></i>Copy SQL
          </button>
        </div>
        <pre class="mb-0 p-2 bg-light border rounded small"><code id="ctx-sql" style="white-space: pre-wrap; word-break: break-word;">&mdash;</code></pre>
      </li>
    </ul>
  </div>
</div>

<script>
  (function () {
    const params = new URLSearchParams(window.location.search);
    const metadata = params.get('metadata');
    if (!metadata) return;

    try {
      
      const base64 = metadata.replace(/-/g, '+').replace(/_/g, '/');
      const jsonStr = decodeURIComponent(escape(window.atob(base64)));
      const data = JSON.parse(jsonStr);

      if (data) {
        let hasData = false;

        if (data.db) {
          document.getElementById('ctx-db').textContent = data.db;
          document.getElementById('row-db').classList.remove('d-none');
          hasData = true;
        }

        if (data.type) {
          document.getElementById('ctx-type').textContent = data.type;
          document.getElementById('row-type').classList.remove('d-none');
          hasData = true;
        }

        if (data.severity) {
          const severityBadge = document.getElementById('ctx-severity');
          const severity = data.severity.toLowerCase();
          severityBadge.textContent = severity.toUpperCase();
          if (severity === 'critical') {
            severityBadge.className = 'badge bg-danger';
          } else if (severity === 'warning') {
            severityBadge.className = 'badge bg-warning text-dark';
          } else {
            severityBadge.className = 'badge bg-info';
          }
          document.getElementById('row-severity').classList.remove('d-none');
          hasData = true;
        }

        if (data.t) {
          const date = new Date(data.t * 1000);
          document.getElementById('ctx-time').textContent = date.toLocaleString();
          document.getElementById('row-time').classList.remove('d-none');
          hasData = true;
        }

        if (data.details) {
          document.getElementById('ctx-details').textContent = data.details;

          
          const labelDetails = document.getElementById('label-details');
          if (data.type === 'object') {
            labelDetails.textContent = 'Object Metadata Details:';
          } else if (data.type === 'report') {
            labelDetails.textContent = 'Report Description:';
          } else {
            labelDetails.textContent = 'Firing Context:';
          }

          document.getElementById('row-details').classList.remove('d-none');
          hasData = true;
        }

        if (data.sql) {
          document.getElementById('ctx-sql').textContent = data.sql;
          document.getElementById('row-sql').classList.remove('d-none');
          const copyBtn = document.getElementById('btn-copy-sql');
          if (copyBtn && navigator.clipboard) {
            copyBtn.addEventListener('click', function () {
              navigator.clipboard.writeText(data.sql).then(function () {
                copyBtn.innerHTML = '<i class="bi bi-check2 me-1"></i>Copied';
                setTimeout(function () {
                  copyBtn.innerHTML = '<i class="bi bi-clipboard me-1"></i>Copy SQL';
                }, 2000);
              });
            });
          }
          hasData = true;
        }

        if (hasData) {
          document.getElementById('pslens-context-panel').classList.remove('d-none');
        }
      }
    } catch (e) {
      console.error('Failed to parse operational context metadata:', e);
    }
  })();
</script>

Records are PeopleSoft's table/view definitions — every database table, SQL view, derived/work record, and dynamic view is registered in `PSRECDEFN`. psLens reads the record definition plus its field list from `PSRECFIELD` and stitches it together with everywhere the record is referenced in pages, components, PeopleCode, queries, projects, and trees. The Records page has 13 related-data panels covering pages, components, PeopleCode, queries, trees, prompt-table back-references, AE statements, COBOL SQL statements, views referencing in SQL, project membership, and a live row sample.

## Object Relationships

Records connect underlying field definitions to user interfaces and security structures:

- **Contains Fields**: Records group individual field definitions (`PSDBFIELD`) into ordered record fields (`PSRECFIELD`).
- **Bound to Pages**: Fields on a record are bound to controls (`PSPNLFIELD`) on page definitions (`PSPNLDEFN`).
- **Primary Search for Components**: Records act as primary search records (`SEARCHRECNAME`) driving component key selection dialogs.
- **Defined by SQL Objects**: View-type records (`RECTYPE = 1`) derive their SELECT SQL definitions from SQL Objects (`PSSQLDEFN`).

## How psLens Improves Record Inspection

A complete impact assessment for a record change in Application Designer requires opening the record definition for properties, fields, and events, running **Find Object References** to find pages using it, walking found pages to identify parent components, executing **Find In** searches across PeopleCode, manually querying `PSAESTMTDEFN`, `PSQRYRECORD`, and `PSTREENODE` for AE, query, and tree usage, checking prompt-table back-references, and opening SQL clients to sample rows.

psLens consolidates record schema fields, page bindings, component trees, PeopleCode events, query usage, prompt-table relationships, AE/COBOL SQL statements, project membership, and a live row sample into one page.

## Search Page

URL: `/records?db={database}`

<figure><img src="/images/screenshots/metadata/records-search.png"
			alt="Record search results for PSREC% showing PSRECDDLPARM, PSRECDEFN, and related records"><figcaption>
			<p>Record search results for <code>PSREC%</code> — note the record type pill (Table/View) and field count on each card</p>
		</figcaption>
</figure>


Search auto-matches as *starts with* — typing `JOB` finds `JOB`, `JOB_DATA`, `JOBCODE`, etc. For more control, include `%` yourself: `%DATA` (ends with), `%PERS%` (contains), or just `%` to list every row. Each card shows record type, field count, the descriptive long name, and last-updated metadata. The **Advanced Filters** panel lets you filter by record type (Table, View, Derived/Work, Subrecord, Dynamic View, Query View, Temp Table), object owner, and last-updated date.

## Detail Page

URL: `/records/{RECNAME}?db={database}`

<figure><img src="/images/screenshots/metadata/records-detail.png"
			alt="Detail page for PSRECDEFN showing record properties and the field list"><figcaption>
			<p>Record detail page for <code>PSRECDEFN</code> — default view with properties, field list, and the Related Data sidebar</p>
		</figcaption>
</figure>


The main pane shows **Record Properties** (type, owner, parent record, outgoing **Related Language Record** and reverse **Related Language For** links when the record serves as another record's related language table, audit options, system table flag, description, audit timestamps) and a full **Record Fields** table with each field's type, length, key indicators, default value, and Edit Table prompt — every detail you'd otherwise open App Designer to confirm. The **Export** button downloads the full record definition as Markdown. The **Related Data** sidebar holds 13 toggles — the broadest set of any object type — covering every place this record is referenced.

## Related Data Panels

### Pages Using This Record

<figure><img src="/images/screenshots/metadata/records-panel-pages.png"
			alt="Pages Using This Record panel listing pages that bind to PSRECDEFN"><figcaption>
			<p>Pages that bind a control to this record</p>
		</figcaption>
</figure>


Lists pages with controls bound to this record (`PSPNLFIELD` join on RECNAME). Useful for impact analysis when changing the record schema.

### Components Using This Record

<figure><img src="/images/screenshots/metadata/records-panel-components.png"
			alt="Components Using This Record panel"><figcaption>
			<p>Components whose pages reference this record</p>
		</figcaption>
</figure>


Lists every component containing a page bound to this record — gives you the user-facing transactions affected by the record.

### PeopleCode Events

<figure><img src="/images/screenshots/metadata/records-panel-peoplecode-events.png"
			alt="PeopleCode Events panel for PSRECDEFN"><figcaption>
			<p>Record PeopleCode events defined on this record</p>
		</figcaption>
</figure>


Lists record-level PeopleCode events (FieldChange, RowInit, SaveEdit, etc.) attached to fields of this record. Sourced from `PSPCMPROG`.

### Included in Projects

<figure><img src="/images/screenshots/metadata/records-panel-projects.png"
			alt="Included in Projects panel for PSRECDEFN"><figcaption>
			<p>App Designer projects that include this record</p>
		</figcaption>
</figure>


Lists App Designer projects (`PSPROJECTITEM`) that include this record — useful for migration history and change tracking.

### Used in App Engines

<figure><img src="/images/screenshots/metadata/records-panel-app-engines.png"
			alt="Used in App Engines panel for PSRECDEFN"><figcaption>
			<p>Application Engine programs that reference this record</p>
		</figcaption>
</figure>


Lists Application Engine programs whose SQL or PeopleCode steps reference this record. Sourced from `PSAESTMTDEFN` text scans.

### Component Interfaces Using This Record

<figure><img src="/images/screenshots/metadata/records-panel-componentinterfaces.png"
			alt="Component Interfaces Using This Record panel"><figcaption>
			<p>CIs whose underlying component is built on a page that uses this record</p>
		</figcaption>
</figure>


Lists Component Interfaces whose underlying component contains a page bound to this record — the integration surface area.

### Record Data

<figure><img src="/images/screenshots/metadata/records-panel-recorddata.png"
			alt="Record Data sample showing the first rows from PSRECDEFN"><figcaption>
			<p>Live sample data from the record itself</p>
		</figcaption>
</figure>


Pulls a live sample of rows from the record using the psoftQL API — first ~10 rows with every column. Lets you see what the data actually looks like without opening App Designer's Run-In-Query or a separate SQL client.

### PeopleCode References

<figure><img src="/images/screenshots/metadata/records-panel-pc-references.png"
			alt="PeopleCode References panel for PSRECDEFN"><figcaption>
			<p>Any PeopleCode program that mentions this record by name</p>
		</figcaption>
</figure>


Broader than "Events" — finds any PeopleCode anywhere in the database that mentions this record by name (component, page, app package, app engine, message, signon, FieldFormula, etc.).

### Queries Using This Record

<figure><img src="/images/screenshots/metadata/records-panel-queries.png"
			alt="Queries Using This Record panel"><figcaption>
			<p>PeopleSoft Queries that include this record</p>
		</figcaption>
</figure>


Lists PeopleSoft Queries (`PSQRYRECORD`) that include this record in a FROM clause. Critical for audit work — "who is reporting from this table?"

### Query Trees Using This Record

<figure><img src="/images/screenshots/metadata/records-panel-querytrees.png"
			alt="Query Trees Using This Record panel"><figcaption>
			<p>Query Tree nodes that expose this record to query authors</p>
		</figcaption>
</figure>


Lists Query Tree nodes (`PSTREENODE`) where this record appears — determines which query authors can build queries against it.

### Used as Prompt Table

<figure><img src="/images/screenshots/metadata/records-panel-prompt-table.png"
			alt="Used as Prompt Table panel"><figcaption>
			<p>Other records whose fields use this record as an Edit/Prompt table</p>
		</figcaption>
</figure>


Lists fields on other records that point to this record as their Edit Table / Prompt Table — shows the lookup relationships that hang off this record.

### COBOL SQL Statements

Lists stored COBOL SQL statements (`SQLSTMT_TBL`) that reference this record in their statement text, program name, or statement name. Displays the COBOL program (`PGM_NAME`), statement type (`STMT_TYPE`), statement name (`STMT_NAME`), and formatted SQL text.

### Views Referencing in SQL

Lists SQL views (`RECTYPE = 1`) and dynamic views (`RECTYPE = 5`) whose underlying definition SQL (`PSSQLTEXTDEFN`) references this record or its SQL table name. Displays view name, view type badge, description, object owner, and last-updated metadata.
