Data Properties

From SpinetiX Support Wiki

Jump to: navigation, search

This page is related to Data-driven widgets page.

Introduction

The "Data Properties" dialog (previously named "Data Feed Properties") allows configuring the properties related to the data source from where the data-driven widgets can retrieve data.

To open the "Data Properties" dialog, click on the Data Properties button, on the "Data source" property of any data-driven widget. At any point, the data source configuration can be tested by clicking the "Test..." button.

The dialog contains the following tabs:

Note Note:
For Elementi X users, the "Data Properties" dialog offers advanced options for more complex data processing and additional tabs might be present.

Source tab

Applies to Elementi S and Elementi M.

"Source" tab of "Data Feed Properties" dialog in Elementi 2015 S

The "Source" tab allows configuring the following properties:

  • URI
    Enter the URI from where the data is retrieved. This can be a local path into the project or a remote http(s) address.
  • Refresh (added in 3.1.0)
    Enter a number, optionally followed by s (implicit), m or h, to specify the period after which the widget should refresh the feed data (this is useful especially when the widget is running in a loop). Enter 0 or the keyword never to prevent the data refresh.
    Note: The minimum accepted value is 10 seconds.
  • Limit
    Enable this option and specify the maximum number of items (rows) to be kept from the data set (starting from the first row).

Parser tab

The parser tab configuring properties specific to the type of parser determined by the data-driven widget type. Note that the "RSS parser" and "Text parser" do not expose any properties within Elementi S and Elementi M.

Note  
See the full article on data parsers.

Fallback tab

"Fallback" tab of "Data Feed Properties" dialog in Elementi 2015 S.

The "Fallback" tab allows defining some fallback values, as following:

  • Entry
    Enter the name of the field / column; for RSS and calendar feeds, the name of the fields are already populated.
  • Default
    Enter the default value to be used when the data for the specified column is missing from the result row. Note that this value in not used when there are no data at all (e.g., the data feed cannot be retrieved or there are no results to be displayed). For instance, you can specify a default image to be used in case the RSS feed does not provide an enclosure field.
  • Placeholder for edition
    This value has no influence other than "cosmetic" and is used when switching a data-driven widget into edit mode (i.e. clicking once on the Preview panel); to edit the layer, click a second time on the field layer - the data placeholder (e.g., [[field]]) can now be edited.

Advanced configuration

Applies to Elementi X

Data Properties dialog in Elementi X

The "Data Properties" dialog contains much more options for Elementi X users:

  • Type
    Select the type of data source from the following: URI (default), Shared Variable, Inline data, Query String, Foreign Exchange and Finance, Spreadsheet and Spreadsheet Chart, Calendar, Media, Social Network (Twitter, Facebook, Yammer), Weather.
  • URI / Variable / Selector
    Enter the data source location / name of the Shared Variable / or inline selector.
  • Parser
    Select the main parser that is applied onto the raw data retrieved from the data source. It can be one of the following: RSS, XML, JSON, CSV, RegExp, ICS, Script, Directory Listing, or Query String.
  • Format
    Add additional formatting rules on the fields returned by the main parser, as following:
    1. In the first box, enter (or select if available) the target field.
    2. In the second box, select the format parser / filter from RSS, XML, JSON, CSV, RegExp, ICS, Script, Query String, Date/Time, Num. Filter, Date Filter, or String Filter.
    3. Click on the "Add" button.
    This will create a new tab containing further options to configure. To remove the parsing rule, click on the red icon on its tab. It is possible to add as many formatting rules as needed.
  • Sort
    Add one sorting rule to be applied to the data, as following
    1. Enable the "Sort" option.
    2. In the first box, enter (or select if available) the target field.
    3. In the second box, select the sort type from "Alphabetical", "Numerical" or "Chronological".
    4. In the third box, select the sort direction from "Ascending" or "Descending".
  • Limit
    Enable this option and specify the maximum number of items (rows) to be kept from the data set (starting from the first row).
  • Synchronize with variable (Sync variable)
    Enter the name of the remote Shared Variable that will be used for data feed synchronization. Added in Elementi 2015 X.
Note Note:
The "Filter" option present in Elementi 3.x, has been removed in Elementi 2015 and replaced by the format data filters: "Num. Filter", "Date Filter" and "String Filter".

Type : URI

Type : URI

The data source is a remote resource retrieved from an HTTP(S) server (using a GET request). The following properties are related to this type:

  • URI
    Enter the address from where the data is retrieved.
  • Refresh (added in 3.1.0)
    Specify the period after which the widget should refresh the spreadsheet data (this is useful especially when the widget is running in a loop); either select one of the provided options ("When document opens", 5m, 10m, ... , 24h) or enter a number, optionally followed by s (implicit), m or h; the minimum accepted value is 10 seconds. Using "When document opens" will refresh the data only when the document is re-opened.

Type : Shared Variable

Type : Shared Variable

The data source is a Shared Variable (its value is used as data), thus the data will be updated each time the Shared Variable is modified. The following properties are related to this type:

  • Variable
    Enter the name of the Shared Variable containing the data.
  • Synchronize with source
    Enable this option to synchronize the data update with the Shared Variable timestamp (useful for synchronized content).

Type : Inline data

Type : Inline data

The data source is an element (typically a text) present within the current document. The following property is related to this type:

  • Selector
    Enter the CSS3 selector syntax to identify where the data is located within the current document. For instance using title will use the content of the first <title> element in the document as the data source.

Type : Query String

Type : Query String

Added in Elementi 3.1.0.

The data source is the list of parameters (i.e. query string) passed through the document URI. There are no particular properties for this type.

Note  
See more about the Query String parser.

Feed Test dialog

To test the data source configuration of a data-driven widget, click the "Test..." button within the "Data Properties" dialog - the results are shown in the "Feed Test" dialog.

"Feed Test" dialog in Elementi 2015

The usual tabs that are shown within the "Feed Test" dialog are:

  • Source (n bytes)
    If present, this tab displays the raw data as retrieved from the data source.
  • Parser (n rows)
    This tab shows the results returned by the main parser, the resulted data being arranged in a table-like format, with columns and rows. The column names are used as data placeholders with the widget layout. For instance to display the content of the column called "title", use [[title]] when editing the layout.
Note Notes:
  • In case an "Operation Failed" error is displayed instead of the actual data and the widget is included into a playlist, open only the widget from Browse panel and try again. If the error persists, try to increase the widget duration so that it will not loop too fast.
  • For Elementi X users, the "Data Feed Properties" dialog offers advanced options for more complex data processing - depending on the additional parser and formatting options applied, more tabs could be displayed within the "Feed Test" dialog. For instance, when applying a "Date/Time" parser on a column named "date", a third tab is added - "Date/Time on 'date' (n rows)"; applying a sorting option, also generates an additional tab, "Sort".
This page was last modified on 7 February 2019, at 19:52.