GetShiftSchedules Method
- Last UpdatedMar 17, 2026
- 3 minute read
The GetShiftSchedules() method retrieves all the current, actual, or projected shifts that are scheduled for all entities that can schedule shifts or for the specified entity within the specified time period from the Shift_To_Go table.
'Declaration
Public Shared Function GetShiftSchedules( _
ByVal entId As Nullable(Of Integer), _
ByVal startTime As Nullable(Of Date), _
ByVal endTime As Nullable(Of Date) _
) As DataSet
'Usage
Dim entId As Nullable(Of Integer)
Dim startTime As Nullable(Of Date)
Dim endTime As Nullable(Of Date)
Dim value As DataSet
value = Ent.GetShiftSchedules(entId, startTime, endTime)
public static DataSet GetShiftSchedules(
Nullable<int> entId,
Nullable<DateTime> startTime,
Nullable<DateTime> endTime
)
Parameters
- entId
- Optional. Holds the ID of the entity whose shifts are being retrieved. If null, the shifts within the specified time period for all entities that can schedule shifts will be returned.
- startTime
- Optional. Holds the start date/time of the time period within which the retrieved shifts must fall. If null, then the start time defaults to the current time.
- endTime
- Optional. Holds the end date/time of the time period within which the retrieved shifts must fall. If null, then the end time defaults to one week from the start time.
Return Value
Returns a Dataset that contains a list of shift schedules for all entities that can schedule shifts or for the specified entity, within the specified time period. If no matching records are found, an empty DataSet is returned.
Based on the input parameters, the projected shift schedules are built on-the-fly using the given start time and end time provided.
The columns of the returned DataSet are described below.
|
Column Name |
Description |
|---|---|
|
ent_id |
An integer that is the entity ID. |
|
start_time |
A datetime that identifies the time the shift starts, in the local time of the entity; the day, hour, and minute is returned but not seconds. |
|
end_time |
A datetime that identifies the time the shift ends, in the local time of the entity; the day, hour, and minute is returned but not seconds. |
|
shift_id |
An integer that is a unique shift identifier. |
|
break1_start |
A datetime that identifies the time the 1st break starts; the day, hour, and minute is returned but not seconds. |
|
break1_end |
A datetime that identifies the time that the 1st break ends; the day, hour, and minute is returned but not seconds. |
|
break2_start |
A datetime that identifies the time that the 2nd break starts; the day, hour, and minute is returned but not seconds. |
|
break2_end |
A datetime that identifies the time that the 2nd break ends; the day, hour, and minute is returned but not seconds. |
|
break3_start |
A datetime that identifies the time that the 3rd break starts; the day, hour, and minute is returned but not seconds. |
|
break3_end |
A datetime that identifies the time that the 3rd break ends; the day, hour, and minute is returned but not seconds. |
| shift_start_utc | A datetime that identifies the time the shift starts, in UTC. Based on start_time in the Shift_Schedule table. |
| shift_end_utc | A datetime that identifies the time the shift ends, in UTC. Based on end_time in the Shift_Schedule table. |
| shift_sched_ent_id | An integer that is the ID of the entity or parent entity that generated this shift. |
| pattern_id | An integer that is the ID of the shift pattern that generated this shift. From the Shift_Schedule table. |
| ent_tz_id | A string that is the time zone ID of the entity. Via links from the Ent, then Site table. |
|
last_edit_comment |
A string that is the comment about why the record was added or changed, from the Shift_Schedule table. |
|
created_at_utc |
A datetime that identifies when the returned dataset was created, in UTC. |
|
row_id |
An integer that represents the row identifier. From the Shift_Schedule table. |