# Parent/child

- Package name: relation

# Parent reference

This field creates a reference to another record. Useful in hierarchical data structures. This field allows the parent to implement [List of Children](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild) type fields. In edit mode, this field displays as a black text box with text autocomplete, which means that the user must know at least some of the resume name of the parent they're looking for. Most times a simple drop down of options is preferred, in which case the field [Lookup: Data item](https://docs.tsnocode.com/books/field-type-reference/page/lookup-data-item) should be used. In most cases it is functionally identical to this field.

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: Yes

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/GvqwHhXFH64h0SVc-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/GvqwHhXFH64h0SVc-image.png)

<span class="mw-headline">Field in edit mode</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-09/scaled-1680-/2wSI94ceOubi3eHM-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-09/2wSI94ceOubi3eHM-image.png)

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-09/scaled-1680-/hnt5cZ4BnoGYEjoq-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-09/hnt5cZ4BnoGYEjoq-image.png)

<span class="mw-headline">Parent solution: Specify which entity the parent record belongs to.</span>

<span class="mw-headline">Allow changes: If this is not checked, the parent cannot be changed later.</span>

<span class="mw-headline">Enable link to master: If this is checked, a button will appear that links directly to the parent. Usually nice to have.</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 201
- SQL datatype: INT(11)
- Class name: FieldSubformMaster

When writing javascript that reacts to changes in this field type use the following code, instead of onchange.  
This snippit wil react as soon as an option is selected instead of when the user exits the field

```javascript
$("#DATA_SELSKAB").on("autocompleteclose", () => {
    setTimeout(() => {
        // Do stuff
    }, 50)
})
```

# List of children

This displays a list of all children that refer to this via a specific field. This field can be either of type [Parent reference](https://docs.tsnocode.com/books/field-type-reference/page/parent-reference) or [Lookup: Data item](https://docs.tsnocode.com/books/field-type-reference/page/lookup-data-item)

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: Yes

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/ESxYgoMv1BzOfwto-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/ESxYgoMv1BzOfwto-image.png)

<span class="mw-headline">Field in edit mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/qa3DmHYZxNMdXdsS-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/qa3DmHYZxNMdXdsS-image.png)

<span class="mw-headline">Child solution key: Choose which reference field in which entity that the List of Children field should operate from.</span>

<span class="mw-headline">Parameters / sortorders: Normal TS url query. Remember to start with questionmark. Example: </span>

<span class="mw-headline">?QUERY\_FIELD\_1=StatusID&amp;QUERY\_OPERATOR\_1=1&amp;QUERY\_VALUE\_1=24&amp;QUERY\_FIELD\_2=StatusID&amp;QUERY\_OPERATOR\_2=1&amp;QUERY\_VALUE\_2=97</span>

<span class="mw-headline">Read as "Section" &gt; "Child Entity" &gt; "Child's reference field"</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 200
- SQL datatype: INT(11)
- Class name: FieldSubformList

# List of children (status filter)

Filtered selection of subitems

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: Yes

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">Field in edit mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/I0fyXpi7wldJhn5o-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/I0fyXpi7wldJhn5o-image.png)

<span class="mw-headline">\[Description of configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 222
- SQL datatype: N/A
- Class name: FieldSubformListStatus

# List of children (select fields)

Filtered selection of fields including sortorder

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: Yes

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">Field in edit mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/e8ZTsRO4DdUj4zKs-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/e8ZTsRO4DdUj4zKs-image.png)

<span class="mw-headline">\[Description of configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 223
- SQL datatype: INT(11)
- Class name: FieldSubformListFieldSelection

# List of children (type filter)

For use with 'Children type selector'

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: Yes

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">Field in edit mode</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/kLx4aBYFZ2NLr5GK-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/kLx4aBYFZ2NLr5GK-image.png)

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/vo4xIRaCc9p1lZ0H-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/vo4xIRaCc9p1lZ0H-image.png)

<span class="mw-headline">\[Eventuel beskrivelse af configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 220
- SQL datatype: INT(11)
- Class name: FieldSubformListVariant

# Children type selector (type filer)

For use with 'List of children (type)'

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: No

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/KwT4Mv4bH9lhfADP-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/KwT4Mv4bH9lhfADP-image.png)

<span class="mw-headline">Field in edit mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

No configuration required for this field type

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 221
- SQL datatype: VARCHAR(80)
- Class name: FieldSubformVariant

# Calc children: Sum

Sum of values in underplaced data

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: Yes

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

Due to its nature this field has no special editing mode.

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/yDxDGOzmjFwkF6dX-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/yDxDGOzmjFwkF6dX-image.png)

Required:

- Child value expression refers to a field system name. Example "HOURS"

Options:

- Additional criterions: Additional SQL statement parameter. Example "PROJECT &lt;&gt; 10029"

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 210
- SQL datatype: N/A
- Class name: FieldSubformLinesSum

# Calc children: Count

Sum of elements in underplaced data

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: \[Yes/No\]

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

Due to its nature this field has no special editing mode.

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/1l7qOs2Keb5xNCvo-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/1l7qOs2Keb5xNCvo-image.png)

<span class="mw-headline">\[Description of configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 211
- SQL datatype: N/A
- Class name: FieldSubformLinesCount

# Calc children: Unique

\[DESCRIPTION\]

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: Yes

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

Due to its nature this field has no special editing mode.

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/Rty296QKYlxbadwe-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/Rty296QKYlxbadwe-image.png)

<span class="mw-headline">\[Description of configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 212
- SQL datatype: N/A
- Class name: FieldSubformLinesDistinct

# Calc children: Minimum

Minimum value in underplaced data

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: Yes

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

Due to its nature this field has no special editing mode.

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/wUKOf1lqqHLeRwGr-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/wUKOf1lqqHLeRwGr-image.png)

<span class="mw-headline">\[Description of configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 213
- SQL datatype: N/A
- Class name: FieldSubformLinesMin

# Calc children: Average

Average value in underplaced data

### Properties

- Type: [Parent/Child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: No
- Show in lists: Yes
- Searchable: Yes
- Requires configuration: Yes

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

Due to its nature this field has no special editing mode.

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/y2Zx7UfRQDvSUgns-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/y2Zx7UfRQDvSUgns-image.png)

<span class="mw-headline">\[Description of configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 215
- SQL datatype: Special
- Class name: FieldSubformLinesAverage

# Calc children: Maximum

Maximum value in underplaced data

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: \[Yes/No\]
- Show in lists: \[Yes/No\]
- Searchable: \[Yes/No\]
- Requires configuration: \[Yes/No\]

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

Due to its nature this field has no special editing mode.

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

[![image.png](https://docs.tsnocode.com/uploads/images/gallery/2025-07/scaled-1680-/Z9vkHkZlIczBVlEf-image.png)](https://docs.tsnocode.com/uploads/images/gallery/2025-07/Z9vkHkZlIczBVlEf-image.png)

<span class="mw-headline">\[Description of configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 214
- SQL datatype: N/A
- Class name: FieldSubformLinesMax

# Many to many relation

\[DESCRIPTION\]

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: \[YES/NO\]
- Show in lists: \[YES/NO\]
- Searchable: \[YES/NO\]

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">Field in edit mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">\[Eventuel beskrivelse af configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 240
- SQL datatype: N/A
- Class name: FieldManyToMany

# Parent reference [shared]

\[DESCRIPTION\]

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: \[YES/NO\]
- Show in lists: \[YES/NO\]
- Searchable: \[YES/NO\]

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">Field in edit mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">\[Eventuel beskrivelse af configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 250
- SQL datatype: INT(11)
- Class name: FieldSharedParentRecord

# List of children (grid-editor)

\[DESCRIPTION\]

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: \[YES/NO\]
- Show in lists: \[YES/NO\]
- Searchable: \[YES/NO\]

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">Field in edit mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">\[Eventuel beskrivelse af configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 203
- SQL datatype: INT(11)
- Class name: FieldSubformListEdit

# List of children [shared]

\[DESCRIPTION\]

### Properties

- Type: [Parent/child](https://docs.tsnocode.com/books/field-type-reference/chapter/parentchild)
- Groupable: \[YES/NO\]
- Show in lists: \[YES/NO\]
- Searchable: \[YES/NO\]

## <span class="mw-headline" id="bkmrk-user-interface-1">User interface</span>

<span class="mw-headline">Field in show mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">Field in edit mode</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

## <span class="mw-headline" id="bkmrk-configuration-1">Configuration</span>

<span class="mw-headline">\[INSERT IMAGE\]</span>

<span class="mw-headline">\[Eventuel beskrivelse af configs\]</span>

## <span class="mw-headline" id="bkmrk-developer-info-1">Developer info</span>

- FeltTypeID: 251
- SQL datatype: INT(11)
- Class name: FieldSharedSubform