TimeOffReasons
Contains predefined labels for time-off requests in Teams Shifts, such as vacation, sick leave, or training.
Table Specific Information
Select
Query the TimeOffReasons table by retrieving everything from teams or by specifying TeamId. By default only the timesoffreasons for teams of the groups you are a member of will be returned. To retrieve timesoffreasons for teams of all groups in your organization, set IncludeAllGroups property to true. The connector will use the Microsoft Teams API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.
- TeamId supports the '=' and IN operators.
- Id supports the '=' operator.
For example, the following queries are processed server side:
SELECT * FROM TimeOffReasons WHERE TeamId IN ('da838338-4e77-4c05-82a6-79d9f0274511', 'da834568-4df7-4c05-82a6-79d9f0274515')
SELECT * FROM TimeOffReasons WHERE TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511' AND Id = 'SHFT_0aee55c3-2bac-4ede-9792-26838fc8bb01'
Insert
To insert a timeoff reason for a team, you need to specify TeamId and at least one another field among DisplayName, IsActive, iconType.
INSERT INTO TimeOffReasons (TeamId, DisplayName, IsActive) VALUES ('acabe397-8370-4c31-aeb7-2d7ae6b8cda1', 'a new reason', 'true')
Delete
To delete a timeoff reason record Id and TeamId are required in WHERE clause.
DELETE FROM TimeOffReasons WHERE Id = 'SHFT_dd50b99a-e2d8-44ad-a445-53ad58bfc37b' AND TeamId = 'acabe397-8370-4c31-aeb7-2d7ae6b8cda1'
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | False |
The unique identifier for the time off reason entry. |
| TeamId | String | False |
The identifier of the Microsoft Team that this time off reason is associated with. |
| CreatedDateTime | Datetime | False |
The date and time when the time off reason was initially created. |
| LastModifiedBy_application_displayName | String | False |
The name of the application that most recently modified this time off reason. |
| LastModifiedBy_application_id | String | False |
The application ID of the service or app that last updated this time off reason. |
| LastModifiedDateTime | Datetime | False |
The timestamp of the most recent update to the time off reason entry. |
| DisplayName | String | False |
The display name for the time off reason, such as Vacation, Sick Leave, or Jury Duty. Required field. |
| IconType | String | False |
The icon representing the time off reason. Supported values: none, car, calendar, running, plane, firstAid, doctor, notWorking, clock, juryDuty, globe, cup, phone, weather, umbrella, piggyBank, dog, cake, trafficCone, pin, sunny. |
| IsActive | Bool | False |
Indicates whether this time off reason is currently active and available for use in new or updated time off requests. |