WorkSync Zones Configuration Utility
This utility script provides zone configuration and testing functionality for the WorkSync V3 report system. It allows administrators to view and verify zone configurations before running full WorkSync reports.
Parameters
@MIN- Start date for the report (example: '9/1/2022')@MAX- End date for the report (example: '9/1/2022')
Data Components
The utility consists of 1 main data section:
- Zone Configuration Display - Shows configured zones with proper formatting and row numbering
Output Format
Simple zone listing with configuration details:
| Column | Description |
|---|---|
| WGNUM | Work Group 5 zone number |
| NAME | Formatted zone name |
| Rownum | Row number for zone ordering (offset by +8) |
Technical Implementation
The script uses:
- Zone filtering table (
@WESTBloom) with predefined zone numbers - Conditional zone name formatting with special handling for zone 1
- ROW_NUMBER() function with +8 offset for proper ordering
- Work Group 5 filtering for zone-based organization
Zone Configuration
Configured zones include:
- Zone numbers: 1, 2, 4, 5, 6, 7, 12, 29
- Special formatting for zone 1:
SUBSTRING(w5.NAME,2,30) - Other zones:
SUBSTRING(w5.NAME,6,30) - Row numbering starts at 9 (ROW_NUMBER() + 8)
Use Cases
- Zone Configuration Testing - Verify zone setup before running reports
- Zone Name Verification - Check proper zone name formatting
- Administrative Setup - Configure zones for new WorkSync implementations
- Troubleshooting - Debug zone-related issues in WorkSync reports
- Documentation - Generate zone reference lists
Benefits
- Quick Verification - Fast way to check zone configuration
- Minimal Overhead - Lightweight utility without full report processing
- Configuration Reference - Clear view of active zones
- Setup Validation - Ensure proper zone formatting before deployment
Integration with WorkSync Reports
This utility uses the same zone configuration logic as:
- WorkSync V3 Full Report
- WorkSync Day Shifts Only
- WorkSync Evening Shifts Only
- WorkSync Night Shifts Only
Related Reports
T-SQL
DECLARE @MIN DATE, @MAX DATE, @ZoneCount int, @Row int
SET @MIN='9/1/2022'
SET @MAX='9/1/2022'
DECLARE @WESTBloom Table(Num smallint)
insert into @WESTBloom(Num) Values (1),(2),(4),(5),(6),(7),(12),(29)
;
With Zones as (
Select w5.WGNUM, Case
When w5.WGNUM = 1 then SUBSTRING(w5.NAME,2,30)
Else SubString(w5.NAME,6,30)
End as NAME,
ROW_NUMBER() Over (Order by Case
When w5.WGNUM = 1 then SUBSTRING(w5.NAME,2,30)
Else SubString(w5.NAME,6,30)
End) + 8 as Rownum
from WORKGROUP5 w5 where w5.WGNUM in (Select num from @WESTBloom)
)
Select * from ZonesContent Inventory
- Doc File:
content/docs/reports/worksync/worksync_zones_configuration.mdx - SQL Script:
SQL/reports/worksync/riverview_version_of_worksync_sechedule_report.sql