> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# foreignkey table

> Foreign Key - enables storage of arbitrary extra key information for every table/row in SuperOffice. You may use this table to store your extra information instead of using the dictionary SDK to create your own tables.

## foreignkey Table (183)

Foreign Key - enables storage of arbitrary extra key information for every table/row in SuperOffice. You may use this table to store your extra information instead of using the dictionary SDK to create your own tables.

## Fields

| Name                      | Description                                      | Type                                    | Nullable |
| ------------------------- | ------------------------------------------------ | --------------------------------------- | :------: |
| foreignkey\_id            | Primary key                                      | PK                                      |    No    |
| foreigndevice\_id         | Reference to device definition                   | FK [foreigndevice](./foreigndevice.mdx) |    No    |
| table\_id                 | SuperOffice table reference                      | TableNumber                             |    No    |
| record\_id                | Record in the referenced table                   | RecordId                                |    No    |
| seqno                     | Sequence number, order of subkeys within one key | Id                                      |    No    |
| subkey                    | Subkey (optional)                                | String(239)                             |    Yes   |
| subvalue                  | Key value                                        | String(239)                             |    Yes   |
| registered                | Registered when                                  | UtcDateTime                             |    No    |
| registered\_associate\_id | Registered by whom                               | FK [associate](./associate.mdx)         |    No    |
| updated                   | Last updated when                                | UtcDateTime                             |    No    |
| updated\_associate\_id    | Last updated by whom                             | FK [associate](./associate.mdx)         |    No    |
| updatedCount              | Number of updates made to this record            | UShort                                  |    No    |

<img src="https://mintcdn.com/superofficeas/6OcOTPa_ISkjXJg4/media/loc/en/database/tables/foreignkey.png?fit=max&auto=format&n=6OcOTPa_ISkjXJg4&q=85&s=30f7bc3246f9f5d92409da01dd86c417" alt="foreignkey table relationship diagram" width="677" height="59" data-path="media/loc/en/database/tables/foreignkey.png" />

## Indexes

| Fields            | Types       | Description |
| ----------------- | ----------- | ----------- |
| foreigndevice\_id | FK          | Index       |
| record\_id        | RecordId    | Index       |
| seqno             | Id          | Index       |
| subkey            | String(239) | Index       |
| subvalue          | String(239) | Index       |

## Relationships

| Table                            | Description                                                        |
| -------------------------------- | ------------------------------------------------------------------ |
| [associate](./associate)         | Employees, resources and other users - except for External persons |
| [foreigndevice](./foreigndevice) | Middle level of Foreign Key system                                 |

## Replication Flags

* Replicate changes DOWN from central to satellites and travellers.
* Replicate changes UP from satellites and travellers back to central.
* Copy to satellite and travel prototypes.

## Security Flags

* No access control via user's Role.


## Related topics

- [Foreign keys](/en/api/foreign-keys/index.md)
- [What's new in version 10.3.9.718](/release-notes/database/changes-10.3.9.md)
- [What's new in version 10.5.1.1092](/release-notes/database/changes-10.5.1.md)
- [What's new in version 10.5.2.435](/release-notes/database/changes-10.5.2.md)
- [What's new in version 10.5.3.711](/release-notes/database/changes-10.5.3.md)
- [What's new in version 10.5.4.867](/release-notes/database/changes-10.5.4.md)
