Bulk Crew Loading and Deleting (Administrative Users)
Administrative Users may perform a bulk import or deletion of crews and crew components (members and vehicles) using the nms‑load‑crews program. The program, which is run from a terminal, requires separate CSV files for crews, crew members, and vehicles.
nms‑load‑crews -crews filename
-members filename
-vehicles filename
[-add|-delete]
[-force]
[-status inactive|off-shift|on-shift]
[] optional parameter
Options
• crews: Required. The crew file to import.
• members: Required. The members file to import.
• vehicles: Required. The vehicles file to import.
• add|delete: Whether to add or delete the crews, members, and vehicles. The default is add, which is assumed if omitted.
• status: Used with the -add option. Whether to add new crews as inactive, off-shift, or on-shift. Default: off-shift.
• force: Used with the -delete option. Whether to force the deletion of active crews. Default: false.
Example
nms‑load‑crews -crews crews.csv -members members.csv -vehicles vehicles.csv
Crew CSV Columns
The columns in the Crew CSV file matches the CREWS database table column names:
• CREW_KEY: numerical key for the crew
• CREW_TYPE: CREW_TYPES.CREW_TYPE value
• TEMP_FLAG: temporary crew Y/N flag
• ZONE_NAME: CONTROL_ZONES.NAME value
• ZONE_CLS: CONTROL_ZONES.NCG_CLASS value
• ZONE_IDX: CONTROL_ZONES.NCG_ID value
• CREW_SIZE: the crew size
• CONTACT: the contact name
• CREW_NAME: the crew name
• MOBILE_NUM: the mobile number
• MOBILE_CARRIER: the mobile carrier
• ALTERNATE_NUM: the alternate contact number
• ALTERNATE_NUM_TYPE: the alternate contact number type
• PAGER_NUM: the pager number
• MDT_CREW: MDT crew Y/N flag
• EXTERNAL_KEY: external ID of the crew
• OUT_OF_RANGE: out of range Y/N flag
• MOBILE_FLAG: Y, N, or O (mobile overridden for NMS)
• MEMBERS: colon-separated list of MEMBER_EMP_NUMB
• VEHICLES: colon-separated list of VEHICLE_NUMB
Crew Member CSV Columns
The columns in the Crew Members CSV file matches the CREW_MEMBERS database table column names:
• MEMBER_NAME: member name
• MEMBER_CLASS: CREW_MEMBER_CLASSES.MEMBER_CLASS
• MEMBER_EMP_NUMB: employee ID
Crew Vehicles CSV Columns
The columns in the Crew Vehicles CSV file matches the CREW_VEHICLES database table column names:
• VEHICLE_TYPE: CREW_VEHICLE_TYPES.VEHICLE_TYPE
• VEHICLE_NUMB: vehicle ID
Using Bulk Add/Delete Scripts
For convenience, two scripts (nms‑add‑crews and nms‑delete‑crews) are available to run the bulk crew changes. Pass arguments to these scripts as stated above or create your own project version that uses a consistent set of options that follow your project's business practices.
Examples
nms‑add‑crews -crews crews.csv -members members.csv -vehicles vehicles.csv
nms‑delete‑crews -crews crews.csv -members members.csv -vehicles vehicles.csv
nms‑delete‑crews -crews crews.csv -members members.csv -vehicles vehicles.csv -force