# Section Display By ForeignKey

## Overview

The **Labii Section Display by ForeignKey** widget functions similarly to the [Section Display by Record](/widgets/section-widgets/data-display/sections/section-display-by-record.md) widget, allowing sections from other records to be displayed. However, instead of manually selecting the source record and sections, this widget retrieves data automatically from a column using the [ForeignKey](/widgets/column-widgets/form/dropdown/foreignkey.md) or [ForeignKeys](/widgets/column-widgets/form/dropdown/foreignkeys.md) widget. This automation eliminates the need for manual selection, ensuring seamless and dynamic reference to related records.

## Use case

* Display SOP procedures in an experiment
* Display the common files in projects from accounts

## Configuration

The following configuration is needed to specify the record and sections to be displayed.

* **Column** - The source ForeignKey or ForeignKeys column of the record. Input to search the column. For ForeignKeys, the first record will be used.
* **Version** - The version of the record. Select a version to freeze the data to display. If the version is not selected, the newest version will be used. When this record is signed, a latest version will be assigned automatically.
* **Is Readonly** - Check to make the data readonly. This does not apply to a particular version of the record.

## Interface

The interface of the widget is exactly same to [Section Display by Record](/widgets/section-widgets/data-display/sections/section-display-by-record.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.labii.com/widgets/section-widgets/data-display/sections/section-display-by-foreignkey.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
