The Territory Review Add-in - A Guide for Maintenance and Support
The Data
- The SharePoint Site
- The Data Depot
- Preprocessed Files
The Territory Review Add-in
- JSL code within the add-in
- Included code stored on SharePoint
- Code revisioning conventions
Table Builder
- Why build preprocessed files?
- What kind of things are done by Table Builder?
- Adds additional columns needed for the reports
- Joins multiple tables together
- Adds event handlers to selected columns
- Adds features for currency conversion on monetary columns
- Builds unified Territory columns (soon this wont be necessary)
- Table builder has about 10K lines of JSL, generates 38 preprocessed tables and takes about 30min to complete
- Automated Processes for Updating the Data
- Code revisioning conventions
Territory Review Include file
- Organization of the file – into sections by report button
- Organization of a typical section
- Territory Report
- Region Report
- File Prep
- What’s typically done in File Prep?
- Opens the table (preprocessed data)
- Subsets it by selected territory or region or string match
- Updates currency conversion columns
- What’s typically done in the Territory Report
- Builds a display window
- Adds buttons to open the data table which is normally hidden
- Adds the graphical reports, mostly Graph Builder or Tabulate
- What’s typically done in the Region Report
- The Region report is used for both the region and string match buttons
- The Territory reports and the Region reports are very similar. The Region reports usually add Territory to local data filters and/or tabulated reports.
- Code revisioning conventions
- The add-in includes v0 and v0 includes the latest released version
- Table Builder is also included. This is done because there are functions and expressions needed for both sets of code. Table builder is not run (this would take about 30mins). However, including the code makes the expressions and functions defined in Table Builder available in Territory Review Include.
- Lines of Code
- The include file has grown as new features were added and is currently over 33K lines of JSL code. Most of it is Graph Builder and Tabulate, so not as bad as it sounds. However, it’s difficult to edit a file this large. One trick is to right-click and select “Collapse All” from the “Advanced” menu.
Multiple Use Functions and Expressions and Utilities and Local Data Filter Handler Functions
- Near the top of the include file there are several functions and expressions.
- Multiple Use Functions and Expressions are used multiple times in the include file.
- Local Data Filter Handler Functions perform custom tasks when a local data filter changes state (a new selection is made in the filter). An example of this is when a Territory is selected in the local data filter, the reference lines on the bar chart are updated to the goals for the selected Territory.
- Keep in mind, other expressions are imported when the Table Builder code is included.
Workflow Style Reports
- Pipeline and QBR Prep are set up as workflows
- They use multiple data tables
- Their reports includes an index that can be used to navigate to different sections of the report
- The “prep” expression opens multiple files, but other than that, they are similar to other “prep” expressions.
- The “report” expressions build a display window. Then the report elements are added to the display.
- Each report element has its own expression, _e1, _e2, etc. These are numbered in the same order as they appear in the display. These expressions will append to the display window that was set up by the “report” expression.
Other Details
- Special Files: Territory XREF.jmp and Keywords.jmp
- Test for connection to the data depot
- GUI preferences and the preference file
Overview video for the data used by the add-in
Overview video for the add-in and what's in the add-in archive file
Overview video for Table Builder
Overview video for the Include file - the organization of the code
Overview video for the Include file - revision conventions and inclusion of Table Builder code
Overview video for the Multiple Use Functions, Expressions, Utilities and LDF Handler Functions
Overview video for the Workflow Style Reports
Overview video for Other Details