TimesOff
TimesOff table for MSTeams data provider.
Table Specific Information
Select
Query the TimesOff table by retrieving everything from teams or by specifying TeamId. By default only the timesoff for teams of the groups you are a member of will be returned. To retreive timesoff for teams of all groups in your organization, set IncludeAllGroups property to true. The component 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 component.
- TeamId supports the IN and = operators.
- Id supports the = operator.
For example, the following queries are processed server side:
SELECT * FROM TimesOff WHERE TeamId IN ('da838338-4e77-4c05-82a6-79d9f0274511', 'da834568-4df7-4c05-82a6-79d9f0274515') SELECT * FROM TimesOff WHERE TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'
Insert
To insert a timeoff into the team schedule, you need to specify TeamId, UserId to whom this timeoff is assigned, and at least one of the DraftTimeOff or SharedTimeOff information including: the startDateTime, the endDateTime of the timeoff and a timeOff_ReasonId.
INSERT INTO TimesOff (TeamId, UserId, sharedTimeOff_startDateTime, sharedTimeOff_endDateTime, SharedTimeOff_TimeOffReasonId) VALUES ('da838338-4e77-4c05-82a6-79d9f0274511', '0409f710-2aa9-4f05-8944-ef382160f1d1', '2019-03-11T07:00:00Z', '2019-03-12T07:00:00Z', 'TOR_97de5f58-462b-4bde-8a95-038b4073bffb')
Update
To update a timeoff record Id and TeamId are required in WHERE clause. You can update any other field other than TeamId, Id and CreatedDateTime.
UPDATE Timesoff SET draftTimeOff_timeOffReasonId = 'TOR_97de5f58-462b-4bde-8a95-038b4073bffb' WHERE Id = 'SHFT_dd50b99a-e2d8-44ad-a445-53ad58bfc37b' AND TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'
Delete
To delete a timesoff record Id and TeamId are required in WHERE clause.
DELETE FROM TimesOff WHERE Id = 'SHFT_dd50b99a-e2d8-44ad-a445-53ad58bfc37b' AND TeamId = 'da838338-4e77-4c05-82a6-79d9f0274511'
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | String | False |
ID of the timeOff. |
UserId | String | False |
ID of the user assigned to the timeOff. |
TeamId | String | False |
The Team Id. |
CreatedDateTime | Datetime | False |
The time stamp at which this timeOff was first created. |
LastModifiedBy_application_displayName | String | False |
The display name of the application that last modified. |
LastModifiedBy_application_id | String | False |
The id of the application that last modified. |
LastModifiedDateTime | Datetime | False |
The time stamp at which this timeOff was last updated. |
DraftTimeOff_timeOffReasonId | String | False |
DraftTimeOff's timeOffReasonId |
SharedTimeOff_timeOffReasonId | String | False |
SharedTimeOff's timeOffReasonId |
DraftTimeOff_StartDateTime | Datetime | False |
StartDateTime of DraftTimeOff |
DraftTimeOff_EndDateTime | Datetime | False |
EndDateTime of DraftTimeOff |
SharedTimeOff_StartDateTime | Datetime | False |
StartDateTime of DraftTimeOff |
SharedTimeOfft_EndDateTime | Datetime | False |
EndDateTime of DraftTimeOff |