Example of Property Controlled On-Demand Data


The data that is to be loaded on demand can be controlled in a number of ways. See Loading Data on Demand for more information. The example below uses a property control in a text area to select which data to display in a bar chart based on an on-demand data table.

In this example, we first assume that we have a data table containing a string column called "Type" which lists a number of different product types loaded in the analysis. We also assume that there is an information link with some additional data available, which also contains a "Type" column. See Creating an Information Link if you need information about how to set up information links.

  1. Select File > Add Data Tables....

    Response: The Add Data Tables dialog is displayed.

  2. Click Add and select the data source (an information link or a data connection). In this example, we use an information link.

  3. Response: The Select Information Link dialog is displayed.

  4. Browse to the information link holding the desired data and select it in the list.

  5. Click OK.

    Response: The information link is added to the Data tables list in the Add Data Tables dialog.

  6. If desired, change the Name for the new on-demand data table.

  7. Select the Load on demand check box.

  8. Click on Settings....

  9. Response: The On-Demand Settings dialog is displayed.

  10. In the Define input for parameters that should control loading list, click to select the column containing the product types.

  11. Click Define Input....

    Response: The Define Input dialog is displayed.

  12. In the Input for the selected parameter list, select Values (fixed/properties/expression).

  13. Click on the Property radio button.

  14. Click Select....

    Response: The Select Property dialog is displayed.

  15. If no suitable property is available, click New... in the Document Properties tab.

    Response: The New Property dialog is displayed.

  16. Define a string property using one of the available product types as default value. For example, create a string property called "Type" with the value "Apples".

  17. Click OK in all dialogs.

    Response: The on-demand data table is loaded using the limiting default value and a visualization is displayed. In the example below, the visualization shown is a bar chart displaying the sum of sales for Apples in four different regions.

add_on_demand_bar_chart_example.png

  1. Create or activate a text area.

  2. Click on the Toggle Edit Mode button, text_toggle_edit_mode_button.png, in the title bar of the text area.

  3. Type some descriptive text to help other users understand what the control will do.

  4. Click on the Insert Property Control button, text_icon_property_control.png, and select which type of control to add. In this example we will add a drop-down list.

    Response: The Property Control dialog is displayed.

  5. Select the previously specified document property.

  6. Select Set property value through: Unique values in column.

  7. Select the Data table to be the first data table in the analysis (not the on-demand data table).

  8. Select the "Type" Column.

  9. If desired, limit the values to be displayed in the drop-down list using a search expression.

    Comment: Only those values matching the search expression will be shown in the control. See Searching in TIBCO Spotfire for more information about valid search expressions.

  10. Click OK.

    Response: The property control is added to the text area.

  11. Click on the Toggle Edit Mode button again to exit the edit mode.

You can now use the property control to change which product type to look at in the visualization. If Load automatically has been selected in the on-demand settings, the visualization will be updated each time the property is changed via the control. If Load automatically has not been selected, a refresh button will be displayed in the title bar of the visualization each time the input is changed.

add_on_demand_property_control_example.png

See also:

Using Properties in the Analysis