A tutorial on how to create a data subset
Caveat: You need to have Template Editor permissions. It may be sensible when naming new hooks, new data subsets, new templates or new template sets to add "TRAINING" as part of the name, to differentiate your work from 'live' production work. Do consider any 'Delete' actions carefully - is it your work you are deleting?
A data subset that can be used by template sets and schedules
You will need to have completed the following article:
You will need a Template Set within which you can select your data subset. This tutorial will be using the 'TRAINING Match' template set.
You will need a Schedule within which you can select your data subset. This tutorial will be using the 'TRAINING Match' schedule.
DATA > DATA PROVIDERS > SCHEMAS & SEARCHES > SCHEMAS, select 'soccer event-report'
Data Subsets can be defined for a particular Schema provided by XMLTeam.
Data Subsets are chosen when creating a Template. If the Template relies on Data that the user needs to select, the selection can be made in the Templates pane of the Web Client. A Data Subset would be useful if, for example, the same Schema for a football team was used for teams in the World Cup, English Premier League, Scottish Premier League etc. - if the Template being created was for a World Cup specific graphic, you would want to limit the Data Documents available from this Data Selector to World Cup teams.
Data Subsets will automatically have their names shortened by removing parts that repeat at the beginning or end of all names in the document list.
When all teams in the subset are in the same league:
"EPL - Teams - Arsenal - Squad" would become: "Arsenal"
"EPL - Teams - Chelsea - Squad" would become: "Chelsea"
When teams in the subset are in different leagues:
"SPL - Teams - Aberdeen - Squad" would become: "SPL - Teams - Aberdeen"
"EPL - Teams - Blackburn - Squad" would become: "EPL - Teams - Blackburn"
The below image shows two tabs beside the Search pane: 'DATA SUBSETS' and 'USER INPUT DATA'. 'DATA SUBSETS' is selected and the image indicates the 'Add' button, in an empty pane below 'DATA SUBSETS'. This is where data subsets are listed when they have been created. To the right-hand side is a greyed out pane.
Below DATA SUBSETS, click 'Add'.
Your new data subset; currently named 'New Subset'; appears in the pane below 'DATA SUBSETS'. The greyed out pane has now populated with:
SORTING & FILTERING
A greyed out sub-pane, which will become populated depending on the filter that is selected
PREVIEW DOCUMENT NAMES
Currently 'PREVIEW DOCUMENT NAMES' is populated with all the data that can be returned by your XML Data Provider for 'soccer event-report'.
Within the left-hand pane (below 'DATA SUBSETS'), click the pencil icon - 'Edit' adjacent to 'New Subset'
Rename: TRAINING EPL
Click the 'Save' icon
Below SORTING & FILTERING
Tick the checkbox for 'Sample Data'
Two things happen here:
Below 'EDIT PATH STARTS WITH FILTER' there are fields beside 'Paths' and the first field is populated with 'SampleData'
Below 'PREVIEW DOCUMENT NAMES' only the sample data loaded into Ignition Post will be displayed, e.g. 'Southampton v Leicester City.xml'
Below SORTING & FILTERING, expand 'soccer event-report (if required) and expand 'Soccer'
Tick the checkbox for 'EPL'
It is worthwhile looking at what has happened again:
Below 'EDIT PATH STARTS WITH FILTER' the fields for 'Paths' are now populated with '/Soccer/EPL' and 'SampleData'
Below 'PREVIEW DOCUMENT NAMES' you now have the sample data and XML from the English Premier League (EPL)
Take a moment to examine the data being returned by your XML Data Provider. Depending on when you are doing this tutorial will dictate what data is displayed, however, you will have matches that have occurred and matches yet to happen in chronological order.
The date and time of matches yet to happen may be based on the original schedule of fixtures put in place by the league at the outset of the season and the order may alter as your data provider updates the data to reflect fixture changes. The data may also alter because some games will be postponed or cancelled due to FA Cup or European commitments and due to bad weather.
NOTE - The list has the name of the fixture, e.g. "Manchester United 2 v Leicester City 1" (at the time the tutorial was created, this was the first match of the 2018/19 season). The list at present also states "Soccer - EPL - Events - " prior to the name of the fixture. If you were to add other leagues to this data subset then this additional information would be necessary to distinguish between the matches in each league. Taking what is in your data subset at present, you could, however, remove 'SampleData' and the list would then no longer need to detail the additional information.
Below SORTING & FILTERING, UNTick 'Sample Data'
Below SORTING & FILTERING, Tick 'Sample Data'
You may have noticed the following below 'AVAILABLE FILTERS':
Path Starts With
Days Of The Week
You can manipulate the data being returned by your data provider as you see fit, you could for example, only want to see FA Cup matches, for this weekend.
Below 'EDIT PATH STARTS WITH FILTER', remove all other 'Paths' and only have a path to: '/Soccer/FA Cup'
Below 'AVAILABLE FILTERS', click the 'Add this filter' button (i.e. <<) adjacent to 'This Weekend'
For this example, there is no data in 'PREVIEW DOCUMENT NAMES' as at the time the tutorial was created there was not an FA Cup fixture planned for the weekend.
NOTE - You can switch between the 'ACTIVE FILTERS' to see what each is capable of doing. Each filter has its own sub-pane:
Path Starts With - 'EDIT PATH STARTS WITH FILTER'
Path Contains - 'EDIT PATH CONTAINS FILTER' - Which has a field 'Values'
Days Range - 'EDIT DAYS RANGE FILTER' - Which has two fields to set the number of 'Previous Days' and the 'Upcoming Days', it also a checkbox to 'Include Sample Data'
This Weekend - 'EDIT THIS WEEKEND FILTER' - Which has a message: "Restricts documents to either this weekend, or next weekend if today is Monday - Friday"
Days Of The Week - 'EDIT DAYS OF WEEK FILTER' - Which has checkboxes for the days and one to 'Include Sample Data'
Replace 'FA Cup' with 'EPL'
Below TEMPLATE SETS, select the 'TRAINING Match' template set
Below TEMPLATE SETS, below SUBSETS, below SUBSET, click within the 'Data Subset' field and select 'TRAINING EPL'
Below DATA, below DATA PROVIDERS, select 'XMLTeam'
Below SCHEDULES, select 'TRAINING Match'
Set the 'Subset' to 'TRAINING EPL'
Click 'Refresh Now'