GetNominalShiftSched Method
- Last UpdatedMar 17, 2026
- 4 minute read
'Declaration
Public Shared Function GetNominalShiftSched( _
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.GetNominalShiftSched(entId, startTime, endTime)
public static DataSet GetNominalShiftSched(
Nullable<int> entId,
Nullable<DateTime> startTime,
Nullable<DateTime> endTime
)
Parameters
- entId
- Optional. Holds the ID of the entity whose shift schedule is being retrieved. If this parameter is null, then the schedules for all entities that can schedule shifts will be returned.
- startTime
- Optional. Holds the date/time of the entity's start time.
- endTime
- Optional. Holds the date/time of the entity's end time.
Return Value
Returns a Dataset that contains the records from the Shift_Schedule table that correspond to the specified entity or its ancestor entity (through the Shift_Pattern_Ent_Link table), or all entities. Some columns from the corresponding shift pattern record in the Shift_Pattern table are also included. If no matching records are found, an empty DataSet is returned.
The columns of the returned DataSet are described below.
|
Column Name |
Description |
|---|---|
|
ent_id |
An integer that is the entity ID. |
|
start_day |
An integer that represents the day of the week that the shift begins (0 = Sunday, 6 = Saturday). From the Shift_Schedule table. |
|
shift_id |
An integer that is a unique shift identifier. From the Shift_Schedule table. |
|
start_time |
A datetime that identifies the time the shift starts; the day, hour, and minute is returned but not seconds. From the Shift_Schedule table. |
|
end_time |
A datetime that identifies the time the shift ends; the day, hour, and minute is returned but not seconds. From the Shift_Schedule table. |
|
break1_start |
A datetime that identifies the time that the 1st break starts; the day, hour, and minute is returned but not seconds. From the Shift_Schedule table. |
|
break1_end |
A datetime that identifies the time that the 1st break ends; the day, hour, and minute is returned but not seconds. From the Shift_Schedule table. |
|
break2_start |
A datetime that identifies the time that the 2nd break starts; the day, hour, and minute is returned but not seconds. From the Shift_Schedule table. |
|
break2_end |
A datetime that identifies the time that the 2nd break ends; the day, hour, and minute is returned but not seconds. From the Shift_Schedule table. |
|
break3_start |
A datetime that identifies the time that the 3rd break starts; the day, hour, and minute is returned but not seconds. From the Shift_Schedule table. |
| break3_end | A datetime that identifies the time that the 3rd break ends; the day, hour, and minute is returned but not seconds. From the Shift_Schedule table. |
| pattern_id | An integer that is the ID of the shift pattern that generated this shift. From the Shift_Schedule table. |
| recurring | A Boolean flag that indicates whether the shifts in the shift pattern are recurring. From the Shift_Pattern table. |
| additive | A Boolean flag that indicates whether the shifts in the shift pattern are additive. From the Shift_Pattern table. |
| comments | A string that contains comments about the shift pattern. From the Shift_Pattern table. |
| end_day_span | An integer that is the end day span value for the shift (i.e., the number of days beyond the start day of the day the shift ends). From the Shift_Schedule table. |
| ent_tz_id | A string that is the time zone ID of the entity. |
|
last_edit_comment |
A string containing any comments about why record was changed. From the Shift_Schedule table. |
|
last_edit_by |
A string that identifies the user that last edited this record. From the Shift_Schedule table. |
|
last_edit_at |
A datetime that identifies when the record was created or last modified. From the Shift_Schedule table. |
|
row_id |
An integer that represents the row identifier. From the Shift_Schedule table. |
This method finds all the shift schedules of all entities, or just the specified entity, from the supplied start to the supplied end time for a maximum duration of seven days from start date. Only entities with the canSchedShifts flag set to true are allowed to define shift schedules.
If the entity passed in this method does not have a shift schedule defined, then the method looks recursively to the default parent entity IDs until a shift schedule is found.
The returned DataSet takes into account the exceptions to the default shift schedule as defined in the Shift_Pattern and Shift_Pattern_Ent_Link tables.
- For a regular shift, recurring is true and additive is false.
- For an overtime shift, recurring is true and additive is true.
- For a holiday shift, recurring is false and additive is false but essentially ignored.
For input parameters that are not to be included as a filter, pass a null.