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 On-Demand Data Table....

    Response: The Select Information Link dialog is displayed.

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

  3. Click OK.

    Response: The Add On-Demand Data Table dialog is displayed.

  4. If desired, change the Data table name for the new on-demand data table.

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

  6. Click Define Input....

    Response: The Define Input dialog is displayed.

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

  8. Click on the Property radio button.

  9. Click Select....

    Response: The Select Property dialog is displayed.

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

    Response: The New Property dialog is displayed.

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

  12. 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