Data Feed Properties

From SpinetiX Support Wiki

Jump to: navigation, search

This page is related to Data feed & Data-driven widgets pages.

Introduction

The "Data Feed Properties" dialog allows configuring the properties related to the data source from where the data-driven widgets can retrieve data, and testing that setup. It contains the following tabs:


Note Note: To open the "Data Feed Properties" dialog, click on the Data Feed Properties button, on the "Data source" property of any data-driven widget.

Note Note: At any point, the data source configuration can be tested by clicking on the "Test..." button.

Source tab

"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).


"Technical note"
For Elementi X users, the "Data Feed Properties" dialog offers advanced options for more complex data processing.

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.

For more details about the available parsers, see Data processing section.

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

"Source" tab of "Data Feed Properties" dialog in Elementi 2015 X
"Source" tab having the "Type" property set to "Shared Variable"
"Source" tab having the "Type" property set to "Inline data"
"Source" tab having the "Type" property set to "Query String"


For Elementi X users, the "Data source" configuration dialog contains much more options:

  • Type
    Select the type of data source. It can be one of the following:
    • URI (default) : 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)
        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 Note: The minimum accepted value is 10 seconds.
      • Sync variable (added in Elementi 2015 X)
        Enter the name of the remote Shared Variable that will be used for data feed synchronization.
    • 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).
    • Inline data: the data source is an element (typically a text) present within the current document.
      • 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.
    • Query String (added in 3.1.0) : the data source is the list of parameters (i.e. query string) passed through the document URI.
  • 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).


Note Note: The "Filter" option present in Elementi 3.x, has been removed in Elementi 2015 and replaced by the format filters: "Num. Filter", "Date Filter" and "String Filter".

This page was last modified on 25 August 2016, at 17:53.