Skip to main content

Section Display By ForeignKey

Specs​

LabelValue
Version1.1.0 (updated on 2026-11-15)
DeveloperLabii Inc.
TypeSection
Support ConfigurationYes

Overview​

The Section Display By ForeignKey widget displays the content of every record that points to the current record. You select a table and the column in that table that references the current record, such as a ForeignKey or ForeignKeys column. The widget then finds the matching records and shows their column groups, their sections, or both, one after another. You can refine the records with a query and hide specific column groups or sections by name.

This widget looks up records in the opposite direction from Section Display By Column. Section Display By Column shows the records that the current record points to. Section Display By ForeignKey shows the records that point to the current record.

When the current record is signed, the widget keeps displaying the matching records as they were at the time of signing. See Signed and Read-only Records.

Use Cases​

  • Experiment Results: Show the results, observations, or analysis records linked to an experiment.
  • Sample Derivatives: Display all aliquots or derived samples that reference a parent sample.
  • Project Overview: Show the tasks, reports, or deliverables that reference a project record.
  • Order Fulfillment: Display the shipments or receiving records that reference a purchase order.
  • Focused Reviews: Use a query and exclusions to show only the relevant records and content.

Interface​

Read-only View​

The widget shows each matching record in turn. Each block starts with a Showing data from link that opens the source record in a new tab, followed by the selected content.

  • Columns: Displays the column groups of each matching record in a compact layout.
  • Sections: Displays the sections of each matching record.
  • All Records: All matching records are loaded and displayed.
  • Empty State: When no records reference the current record, the widget says so.

Read-only view of the Section Display By ForeignKey widget

The read-only view displays the content of the records that reference the current record.

Edit View​

In the edit view, you configure where the records come from, what to display, what to exclude, and whether the displayed content can be edited.

  • Table: Select the table that contains the referencing records.
  • Column Referenced: Select the column in that table that references the current record.
  • Query: Add extra query criteria to filter the records.
  • Display: Select All columns, All sections, or both.
  • Exclude: Enter the names of the column groups or sections to hide, separated by ,.
  • Is Readonly: Choose whether the displayed content is read-only or editable.

Configuration​

Initial Setup​

Open the record and add the Section Display By ForeignKey widget to a section.

Click Edit to open the widget settings.

Select the Table and the Column Referenced that points to the current record.

Optionally update the Query, select what to display in Display, enter names in Exclude, and click Submit.

Required Settings​

  • Table: The table that contains the records to display.
  • Column Referenced: The column in the selected table that references the current record. Supported widgets are ForeignKey, ForeignKeys, Files, and Column Data.
  • Display: What to display for each matching record:
    • All columns: The column groups of the record.
    • All sections: The sections of the record.

Optional Settings​

  • Query: Extra query criteria added to the search. The default is is_archived=false. Clear it to include archived records.
  • Exclude: Column group or section names to hide, separated by ,. For example, Account Information, Notes hides the Account Information column group and the Notes section. Matching is not case-sensitive.
  • Is Readonly: Selected by default. Clear it to edit the columns and sections of the matching records directly from the current record.
warning

When Is Readonly is cleared, changes made in this widget are saved to the matching source records, not to the current record.

Upgrading Earlier Configurations​

Before version 1.0.0, this widget displayed selected sections of the first record linked from a ForeignKey or ForeignKeys column of the current record, optionally from a fixed version. Sections configured that way continue to display as before. When you edit such a section, the new settings form opens. After you select a Table and Column Referenced and submit, the widget uses the new behavior.

tip

To display the records that the current record points to, use Section Display By Column. To display a manually selected record, use Section Display By Record.

Additional Functions​

Signed and Read-only Records​

To meet regulatory requirements, a signed record must keep showing the data it was signed with.

  • While the section is editable, the widget displays the current matching records and saves the latest version of each.
  • When the section is read-only, the widget displays the saved versions instead of searching for the matching records. A section is read-only when the record is signed or completed, when it is printed or opened as a version, or when you do not have permission to edit it.
info

This is different from the Is Readonly setting, which only controls whether the displayed content can be edited while the section is editable.

note

Sections that have not saved any versions yet display the current matching records.

Automatic Record Lookup​

While the section is editable, the widget finds the matching records automatically every time the record is opened.

  • Always Current: New records that reference the current record appear without changing the widget settings.
  • Query Filtering: Narrow the records with any supported query criteria.
  • Self-Reference Protection: The current record is skipped if it matches the search.

Recursion Protection​

If a matching record contains a Section Display By Record, Section Display By ForeignKey, or Section Display By Column widget, that section is skipped. This prevents records that reference each other from displaying each other without end.

Integration Features​

  • Relationship Widget Integration: Works with ForeignKey, ForeignKeys, Files, and Column Data columns that reference the current record.
  • Column Group Integration: Uses the column groups defined in the table of each matching record.
  • Section Integration: Displays the sections of each matching record with their own widgets.

Best Practices​

Data Organization​

  • Organize the columns of the source table into clear column groups so you can exclude them by name.
  • Use consistent section names in the source table so one Exclude value works for all records.

Workflow Design​

  • Keep Is Readonly selected when the displayed content is for reference.
  • Clear Is Readonly only when users should update the matching records from the current record.
  • Use Query to limit the records when many records reference the current record.
  • Open the record before signing so the widget saves the latest versions of the matching records.
tip

Add this widget to a table template so every new record automatically shows the records that reference it.

Common Pitfalls to Avoid​

  • Avoid selecting a column that does not reference the current table, because no records will match.
  • Avoid misspelling names in Exclude, because only exact names (ignoring case) are hidden.
  • Avoid displaying many large records at once, because every matching record is loaded and displayed in full.