SQL View Name:schdl_tracker
SQL View Number:6023
Group:Support
Base Table:user
Description:Used by Schedule Tracker to list schedules
Flags:VIEW_OPTIMIZED 
Baseline/Custom:Baseline

Fields:

Field NameCommon TypeDatabase TypeGeneric Field IDArray SizeDefaultFlagsComment
appt_confirmLONGsmallint   DIRECT 0=unconfirmed, 1=confirmed, default=0 
cell_textCHARvarchar 255  Contains a concatenation of locally-selected fields for display by Schedule Tracker. 
cityCHARvarchar 30 SEARCHABLE City where site is located 
districtCHARvarchar 80 SEARCHABLE District to which the site belongs 
durationLONGint6  DIRECT Length of appointment in seconds 
first_nameCHARvarchar1530 SEARCHABLE Employee first name 
last_nameCHARvarchar1430 SEARCHABLE Employee last name 
login_nameCHARvarchar230 SEARCHABLE User login name 
objidLONGint3  DIRECT Internal record number of disptchfe, appointment, employee 
regionCHARvarchar 80 SEARCHABLE Region to which the site belongs 
s_cityCHARvarchar 30  City where site is located 
s_districtCHARvarchar 80  District to which the site belongs 
s_first_nameCHARvarchar 30  Employee first name 
s_last_nameCHARvarchar 30  Employee last name 
s_login_nameCHARvarchar 30  User login name 
s_regionCHARvarchar 80  Region to which the site belongs 
s_site_nameCHARvarchar 80  Name of the site 
s_stateCHARvarchar 30  State where site is located 
s_statusCHARvarchar 50  Contains a concatenation of locally-selected fields for display by Schedule Tracker. 
s_type_nameCHARvarchar 70  Name of the schedule type - Available, Appointment, or Field Dispatch 
site_idCHARvarchar 80  Unique site number assigned according to auto-numbering definition 
site_nameCHARvarchar 80 SEARCHABLE Name of the site 
start_timeCLK_TIMEdatetime    Time appointment starts or requested eta for field dispatch 
stateCHARvarchar 30 SEARCHABLE State where site is located 
statusCHARvarchar 50 SEARCHABLE Contains a concatenation of locally-selected fields for display by Schedule Tracker. 
typeCHARvarchar 32  type of schedule, 0 for Available, 1 for Appointment, 2 for Field Dispatch 
type_nameCHARvarchar 70 SEARCHABLE Name of the schedule type - Available, Appointment, or Field Dispatch 
user_objidLONGint   DIRECT Internal record number of user 

SQL:

(select objid, '1' as type, type_elm_title as type_name, type_elm_title as type_name, user_objid, first_name, first_name,
last_name, last_name, district, district, region, region, site_id, site_name, site_name, city, city, state, state, login_name, login_name,
start_time as start_time, duration, 0 as appt_confirm, cell_text, status_elm_title as status, status_elm_title as status
from table_schdl_tracker_sub_v1
where status_lst_title = 'SCHEDULE_STATUS' AND status_elm_rank = 4 AND type_lst_title = 'SCHEDULE_TYPE' AND type_elm_rank = 2
union
select objid, '2' as type, type_elm_title as type_name, type_elm_title as type_name, user_objid, first_name, first_name,
last_name, last_name, district, district, region, region, site_id, site_name, site_name, city, city, state, state, login_name, login_name,
requested_eta as start_time, duration, appt_confirm, cell_text, status_elm_title as status, status_elm_title as status
from table_schdl_tracker_sub_v2
where status_lst_title = 'SCHEDULE_STATUS' AND appt_confirm=status_elm_rank-2 AND type_lst_title = 'SCHEDULE_TYPE' AND type_elm_rank = 3 AND queue_objid IS NULL AND wipbin_objid IS NOT NULL
union
select objid, '2' as type, type_elm_title as type_name, type_elm_title as type_name, user_objid, first_name, first_name,
last_name, last_name, district, district, region, region, site_id, site_name, site_name, city, city, state, state, login_name, login_name,
requested_eta as start_time, duration, appt_confirm, cell_text, status_elm_title as status, status_elm_title as status
from table_schdl_tracker_sub_v3
where status_lst_title = 'SCHEDULE_STATUS' AND appt_confirm=status_elm_rank-2 AND type_lst_title = 'SCHEDULE_TYPE' AND type_elm_rank = 3 AND queue_objid IS NULL AND wipbin_objid IS NOT NULL
union
select objid, '2' as type, type_elm_title as type_name, type_elm_title as type_name, user_objid, first_name, first_name,
last_name, last_name, district, district, region, region, site_id, site_name, site_name, city, city, state, state, login_name, login_name,
requested_eta as start_time, duration, appt_confirm, cell_text, status_elm_title as status, status_elm_title as status
from table_schdl_tracker_sub_v4
where status_lst_title = 'SCHEDULE_STATUS' AND appt_confirm=status_elm_rank-2 AND type_lst_title = 'SCHEDULE_TYPE' AND type_elm_rank = 3 AND shared_pers >= 0
union
select objid, '2' as type, type_elm_title as type_name, type_elm_title as type_name, user_objid, first_name, first_name,
last_name, last_name, district, district, region, region, site_id, site_name, site_name, city, city, state, state, login_name, login_name,
requested_eta as start_time, duration, appt_confirm, cell_text, status_elm_title as status, status_elm_title as status
from table_schdl_tracker_sub_v5
where status_lst_title = 'SCHEDULE_STATUS' AND appt_confirm=status_elm_rank-2 AND type_lst_title = 'SCHEDULE_TYPE' AND type_elm_rank = 3 AND shared_pers >= 0
union
select objid, '0' as type, type_elm_title as type_name, type_elm_title as type_name, user_objid, first_name, first_name, last_name, last_name,
district, district, region, region, site_id, site_name, site_name, city, city, state, state, login_name, login_name,
start_time as start_time, duration, 0 as appt_confirm, item_elm_title as cell_text, status_elm_title as status, status_elm_title as status
from table_schdl_tracker_sub_v6
where appt_objid=-2 AND status_lst_title = 'SCHEDULE_STATUS' AND status_elm_rank = 1 AND type_lst_title = 'SCHEDULE_TYPE' AND type_elm_rank = 1 AND item_lst_title = 'SCHEDULE_ITEM' AND item_elm_rank = 0)
My Recent Objects
schdl_tracker