> ## 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.

# selection table

> Selections

## selection Table (23)

Selections

## Fields

| Name                            | Description                                                                                                                                                                                    | Type                                                              | Nullable |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | :------: |
| selection\_id                   | Primary key                                                                                                                                                                                    | PK                                                                |    No    |
| associate\_id                   | Associate who owns the selection                                                                                                                                                               | FK [associate](./associate.mdx)                                   |    No    |
| group\_idx                      | Original primary user group of associate                                                                                                                                                       | FK [UserGroup](./usergroup.mdx)                                   |    No    |
| name                            | Name, freetext indexed                                                                                                                                                                         | String(219)                                                       |    No    |
| text\_id                        | Description text                                                                                                                                                                               | FK [text](./text.mdx)                                             |    Yes   |
| postitText\_Id                  | Postit text                                                                                                                                                                                    | FK [text](./text.mdx)                                             |    Yes   |
| visibility                      | Obsolete, but still maintained denormalization of visiblefor                                                                                                                                   | UShort                                                            |    Yes   |
| seltype                         | 0 = static selection, 1 = dynamic selection, 2 = combined selection. See the 'SystemType' field to disnguish between user selections, and Temporary or other system-managed kinds of selection | UShort                                                            |    Yes   |
| searchCat\_id                   | Search category (list)                                                                                                                                                                         | FK [SearchCat](./searchcat.mdx)                                   |    Yes   |
| companyUnique                   | Only one person from a company may be selected as a member                                                                                                                                     | UShort                                                            |    Yes   |
| soundEx                         | What the name sounds like, for duplicate detection                                                                                                                                             | String(9)                                                         |    Yes   |
| source                          | How did we get this selection? For future integration needs                                                                                                                                    | UShort                                                            |    Yes   |
| memberCount                     | How many selectionmembers (for progress bar)                                                                                                                                                   | UInt                                                              |    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    |
| includePerson                   | 0 = Include first person, 1 = Include all persons, 2 = Include no persons                                                                                                                      | Int                                                               |    Yes   |
| targetTableNumber               | Table number that this is a selection of (contact, sale, appointment, ....)                                                                                                                    | TableNumber                                                       |    No    |
| done                            | Done (0=false, 1=true). Status implies changes in which fields are shown in GUI, as well as which fields can be updated                                                                        | Bool                                                              |    Yes   |
| combinationType                 | How should the inputs of a combined selection be combined                                                                                                                                      | Enum [SelectionUnionType](./enums/selectionuniontype.mdx)         |    Yes   |
| leftSelectionId                 | ID of the left selection of a combined selection                                                                                                                                               | FK [selection](./selection.mdx)                                   |    Yes   |
| rightSelectionId                | ID of the right selection of a combined selection                                                                                                                                              | FK [selection](./selection.mdx)                                   |    Yes   |
| dashboard\_tile\_definition\_id | The associated tile definition                                                                                                                                                                 | FK [dashboard\_tile\_definition](./dashboard-tile-definition.mdx) |    Yes   |
| SystemType                      | Selection system type - defines if this selection is one that is managed by the system, and what kind it is                                                                                    | Enum [SelectionSystemType](./enums/selectionsystemtype.mdx)       |    Yes   |
| chartKey                        | ID/key of the last-used chart tile on this selection                                                                                                                                           | String(254)                                                       |    Yes   |
| lastLoaded                      | The date/time this selection was last loaded (selectionentity fetched)                                                                                                                         | DateTime                                                          |    Yes   |
| lastLoadedBy                    | Who last loaded this selection                                                                                                                                                                 | FK [associate](./associate.mdx)                                   |    Yes   |
| lastMembershipChange            | The date/time the membership the selection last changed. Dynamic: change of criteria; Static: add/remove members; Combined: change of algorithm                                                | DateTime                                                          |    Yes   |
| lastMembershipChangeBy          | Who last changed the membership                                                                                                                                                                | FK [associate](./associate.mdx)                                   |    Yes   |

<img src="https://mintcdn.com/superofficeas/8-OIGQQJR0VGDXy_/media/loc/en/database/tables/selection.png?fit=max&auto=format&n=8-OIGQQJR0VGDXy_&q=85&s=d17d0d161274c0e0155500697a8ce60c" alt="selection table relationship diagram" width="971" height="818" data-path="media/loc/en/database/tables/selection.png" />

## Indexes

| Fields        | Types       | Description |
| ------------- | ----------- | ----------- |
| group\_idx    | FK          | Index       |
| name          | String(219) | Index       |
| soundEx       | String(9)   | Index       |
| source        | UShort      | Index       |
| done          | Bool        | Index       |
| associate\_id | FK          | Clustered   |

## Relationships

| Table                                                      | Description                                                                                                                                                                                                                       |
| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [associate](./associate)                                   | Employees, resources and other users - except for External persons                                                                                                                                                                |
| [board\_view\_settings](./board-view-settings)             | Settings for selection board view                                                                                                                                                                                                 |
| [dashboard\_tile\_definition](./dashboard-tile-definition) | Describes the contents of a tile                                                                                                                                                                                                  |
| [landing\_page](./landing-page)                            | Per-associate landing page configuration for a given entity type                                                                                                                                                                  |
| [s\_link](./s-link)                                        | Links in messages to measure success rate of a campaign.                                                                                                                                                                          |
| [s\_shipment](./s-shipment)                                | Contains info about one shipment. The addresses are stored in s\_shipment\_addr                                                                                                                                                   |
| [SearchCat](./searchcat)                                   | SearchCat list table                                                                                                                                                                                                              |
| [selection](./selection)                                   | Selections                                                                                                                                                                                                                        |
| [selectionmember](./selectionmember)                       | Selection detail table  Each row in a selection is represented by one record in this table. Contact\_id is always filled in, person\_id is optional, but if used, must point to a person belonging to the contact in contact\_id. |
| [text](./text)                                             | Long text fields from all over the system                                                                                                                                                                                         |
| [UserGroup](./usergroup)                                   | Secondary user groups                                                                                                                                                                                                             |
| [VisibleFor](./visiblefor)                                 | Visible for rights, who may see this appointment/document, sale,  salehist or selection                                                                                                                                           |
| [workflow](./workflow)                                     | SuperOffice specific info about a workflow                                                                                                                                                                                        |

## Replication Flags

* None

## Security Flags

* Sentry controls access to items in this table using user's Role and data rights matrix.
* Visibility controlled via matching [VisibleFor](./visiblefor) row.


## Related topics

- [Selection table](/en/api/bulk-operations/bulk-update/reference/selection-table.md)
- [Dynamic selections](/en/api/search/selection/dynamic-selections.md)
- [ticket_selection_freetextsearch](/en/api/mdo-providers/reference/ticket_selection_freetextsearch.md)
- [selection](/en/api/mdo-providers/reference/selection.md)
- [selectionmember table](/en/database/tables/selectionmember.md)
- [Create Selection From Selection](/en/api/reference/restful/agent/selection_agent/create-selection-from-selection.md)
