Using DataSets to display meeting room bookings with Xibo
Please note: If you are using the 1.8 series CMS, please use the following link: Getting Started Guide - DataSets 1.8.
DataSets are a feature to design and store tabular data. Once designed data can be entered manually, imported from a CSV file, as JSON via the API or synced remotely on a schedule. The DataSet is defined in the Library and can be reused across multiple DataSet Views and Layouts and comes in two parts:
- The DataSet (Data Structure and data)
- The Display (DataSet View Widget/ DataSet Ticker Widget/ a source of data for a custom module)
This tutorial will walk you through the process of how to produce a Layout to show a current meeting on a screen in a meeting room, that will update automatically from the information held in a created DataSet.
Log in to your CMS and click on the DataSets page under the Library section of the main menu. Click on the Add DataSet button and name it “Meeting Room 1” to represent that the DataSet will hold the schedule for that meeting room, and Save.
We now need to define the fields that the DataSet will hold. For any given meeting we need to know the following information:
- When it starts
- When it finishes
- Meeting Name
- Meeting Description/Notes
So we need to create 4 columns in the DataSet as follows:
Click on the drop-down Menu for your DataSet ‘Meeting Room 1” and View Columns. One column (Col1) has been added by default.
Click on the drop-down button next to Col1 to Edit.
- Change Heading to ‘dtMeetingStart’.
- Column Type set to ‘Value’.
- Data Type set to ‘Date’.
- Column Order set to ‘1’ (the other values can be left blank).
Using the Add Column button repeat the above steps for ‘dtMeetingFinish’ and set a Column Order of 2.
Repeat these actions for the remaining two columns needed but this time change the Data Type to ‘String’ and increase the column order by 1 for each column.
You should now have a column structure that looks like this:
Next, we need to add some data to our DataSet. For this example, we will manually key data in but you can choose to import data directly from a CSV file which could also come from another system, such as a meeting room booking system.
Click on the View Data button, then click on Add Row. Using the datepicker enter dates and times, (ensure that a meeting will be running at the time you Preview your Layout so that there is something to view later!). Give your meeting a name and a description (which will be shown on your displays), Save.
Add additional Rows to create a schedule of meetings which will take place in Meeting Room 1.
You can make edits to your data by simply double clicking on the row you wish to amend and saving.
Now you should have a structured DataSet containing some test data that we can use in Layouts!
Creating Layouts to leverage your DataSets.
From the CMS menu, go to Layouts:
- Add Layout and once created Checkout to enable editing.
- Add an image or choose a coloured background. For the purpose of this tutorial I have downloaded a background image from the Xibo Layout Exchange called “BlueGreen - Clock”.
- Click on the Layout Navigator edit icon to open and resize and position your Region so that the Region sits inside the black area of the background image, Save and Close.
- Click on Widgets on the bottom toolbar and drag or click to add the DataSet Ticker Widget to the empty Region.
- Use the dropdown to select the ‘Meeting Room 1’ DataSet created in the first step.
We can now use the Edit Ticker form to suit your specific needs:
- Opt to give this Widget a name.
- Tick Set a duration to change the default time to a value that is more appropriate for your Layout (I have chosen a duration of 90 seconds).
- Go to the Templates tab and click on Main. Toggle On the Visual editor and click in the Preview window to open the inline editor.
- Include text and Snippets to the editor and resize, position etc to make the text from the DataSet look attractive in the layout.
- Use the Template tab again but this time click on No Data.
- Enter a message, using the text editor, to display a message when there is no data returned from the source so that your audience is not left with a blank screen.
- Go to the Filter tab as we want to only show current meeting information so will need to filter using a SQL command
- Tick to Use advanced filter clause.
- Copy and paste the following into the Filter field to only show items where the meeting has started but hasn’t finished.
NOW() > dtMeetingStart AND NOW() < dtMeetingFinish
- Go to the Caching tab and set the Update Interval. This is how long the client should wait between checks to make sure there’s no new data in the DataSet. For a live booking system, we would recommend setting a value of 5 minutes.
Your Layout will now show your updated information. Preview the Layout to see the correct data displayed for the current meetings in Meeting Room 1, as defined in the DataSet.
Once happy, Layouts can then be scheduled, once set to Published by using the green publish button on the bottom toolbar, to be shown on your chosen Display/Display Groups!
If you edit the DataSet your changes will be available in the system straight away ready to be picked up by Players on their next collection, with no need to make any edits to the Layout.
Now you have hopefully grasped the concept of DataSets and how they can be utilised so that you can get the best out of Xibo!
Additional help available: