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

# StatusDef table

> Status definitions. Name and description are in LocaleText for internationalization

## StatusDef Table (198)

Status definitions. Name and description are in LocaleText for internationalization

## Fields

| Name                      | Description                                                                                                                                                               | Type                            | Nullable |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | :------: |
| StatusDef\_id             | Primary key                                                                                                                                                               | PK                              |    No    |
| isVisual                  | Should the status be visualized (active) in the client                                                                                                                    | Bool                            |    Yes   |
| needsUpdate               | Is the definition dirty, ie., ALL values are invalid until a recalculation; this flag is set when the status DEFINITION is changed, as opposed to the flag on StatusValue | Bool                            |    Yes   |
| rank                      | Priority rank, in case more than one status is signalled. Lowest wins                                                                                                     | UShort                          |    Yes   |
| deleted                   | Deleted flag, 1 if this record is deleted (never from the database)                                                                                                       | Bool                            |    Yes   |
| ownerTable                | The owning entity, currently contact or project                                                                                                                           | TableNumber                     |    Yes   |
| dirtyOnChange             | If 1, the statusValue records should be set to dirty whenever information related to the owning entity changes. If 0, nothing happens.                                    | Bool                            |    Yes   |
| defaultTask               | Default task type for this status; the default task text is in the text table (since it can be long), and may contain template variables                                  | FK [Task](./task.mdx)           |    Yes   |
| lastGenerated             | When was the last generation finished  (i.e., statusValue rows created)                                                                                                   | DateTime                        |    Yes   |
| numMatches                | Number of targets that have this status, this should be the number of rows in StatusValue pointing to this definition, and that have isSignalled set to 1                 | UInt                            |    Yes   |
| numNeedUpdate             | Number of targets that had this status, but have their needsUpdate bit set due to some change                                                                             | 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    |
| generationStart           | When was the last regeneration started                                                                                                                                    | DateTime                        |    Yes   |

<img src="https://mintcdn.com/superofficeas/3ZhivzBeXAvFeVZx/media/loc/en/database/tables/StatusDef.png?fit=max&auto=format&n=3ZhivzBeXAvFeVZx&q=85&s=c53644fd303a3ca4157c8a58234c9cd5" alt="StatusDef table relationship diagram" width="759" height="724" data-path="media/loc/en/database/tables/StatusDef.png" />

## Indexes

| Fields | Types | Description |
| ------ | ----- | ----------- |

## Relationships

| Table                        | Description                                                        |
| ---------------------------- | ------------------------------------------------------------------ |
| [associate](./associate)     | Employees, resources and other users - except for External persons |
| [StatusValue](./statusvalue) | Values for statuses                                                |
| [Task](./task)               | Task list table, activity types, like Phone, Meeting               |
| [text](./text)               | Long text fields from all over the 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

- [statusdef](/en/api/mdo-providers/reference/statusdef.md)
- [StatusValue table](/en/database/tables/statusvalue.md)
- [Task table](/en/database/tables/task.md)
- [text table](/en/database/tables/text.md)
- [Create Default Status Monitor](/en/api/reference/restful/agent/saint_agent/create-default-status-monitor.md)
- [Create Default Project Status](/en/api/reference/restful/rest/list_projectstatus/create-default-project-status.md)
