Spotfire® User Guide

Adding a property control to a text area

By adding a property control to a text area (using the installed client), and populating it with values from a column, you can let other people control what to show in a visualization, even if they do not have authoring rights.

About this task

See Configuring an on-demand data table for an example where the property control can be used to update an on-demand data table. The steps below uses this example as the basis for what to select.
Note: You cannot show more than 1000 values in a property control. However, you should try keep down the number of available values as much as possible, to make the control easier to use.

Before you begin

Text areas must be authored in the installed client.

Procedure

  1. Create or click to activate a text area.
  2. On the title bar of the text area (or in the right-click menu) click Edit Text Area .
  3. In the Edit Text Area dialog, type some descriptive text to help others understand what the control will do.
  4. Click Insert Property Control , and select which type of control to add. In this example we will add a Drop-down list. See below for other options.
    OptionDescription
    Label Shows the current value of the selected property in the text area:

    The label can also be used with binary properties. This means that you can use it to display images as well as text.

    Input field Adds a text box where you can type a new value for the property:

    Input field (multiple lines) Adds a text box where you can type new values for a string property with multiple lines:

    The Input field (multiple lines) control can only be used with string properties.

    Drop-down list Adds a drop-down list, where the property value can be changed by selecting among predefined options:

    List box Adds a list box, where the property value can be changed by selecting among predefined options:

    List box (multiple lines) Adds a list box, where the property value can be changed by selecting several predefined options:

    The List box (multiple select) control can only be used with multiple line string properties.

    SliderAdds a slider where the property values can be changed by moving the slider:

    The current property value is shown in a label above the slider.

  5. In the Property Control dialog, select a document property. In this example we use a string property called "Type", with the value "Apples".
    Tip: You can create a new property by clicking New and defining a name, type and a value.
    Tip: It is also possible to click Script and define a script action that should be performed whenever the document property changes its value. See also Managing scripts in Spotfire.
  6. Select Set property value through and choose an option. In this example we use Unique values in column.
    This option will show all unique values in the column as possible choices to select in the drop-down list. See below for other options.
    OptionDescription
    Column selection Shows a list of columns to select from.

    If you not all columns should be available, you can type an expression to only show columns of interest. For example, use datatype:integer or datatype:real to only show columns of a certain data type.

    You can also search for columns matching a specific column property value. For example, if you have added a column property called included.column, with the default value false, and you update the value for the columns that you want to include to true, you can use included.column:true in your search expression. The Select Column dialog helps you create this type of boolean selection.

    If you use a List box (multiple lines) control, you can specify whether there should be a min or a max number of selections in the list box using the Selection Constraints dialog.

    Unique values in column Shows a list of unique values picked from a column.

    If not all values in the selected column should be available, you can type an expression to limit which values to show. Expressions can limit the available values to show. For example, to only use values beginning with A, enter "A". See Searching in Spotfire clients for more information.

    Expressions Available for string properties only. Shows a list of values obtained via more or less complex calculations. The display names entered in the Custom Expression dialog are what the end users of the property control will see in the list.

    The expressions can include other (numerical) properties which in turn can be changed using other property controls.

    Fixed values Shows a list of values that you define yourself. The display name used in the control can be different from the actual value of the alternative.
    Numerical range Shows a range of values from min to max, increased using a specified value interval. Can be used with numerical properties only.

    For example, with a range from 1-10 and an interval of 1, you will be able to change the slider in steps of one:



    If the max number and the interval steps do not break even, there will be a shorter interval between the last available values.

    Clear the Show min and max labels check box to remove the labels for the max and min values of the control and just keep the current property value above the control.

    Many of the options also let you select Include (None) alternative which adds the alternative (None) to the list of available options.
  7. Depending on what you chose in step 6, you see different things here, but this example assumes that you chose Unique values in column. If more than one data table is available in the analysis, select the Data table to work on.
    If you want to use the control to define an on-demand data table, then this should be the main data table and not the on-demand data table.
  8. Select the Column to use. In this example, we use the "Type" column.
  9. If desired, you can limit the values to show in the drop-down list using a search expression.
    Only those values matching the search expression will be shown in the control. See Searching in Spotfire clients for more information about valid search expressions.
  10. Click OK and, in the Edit Text Area dialog, click Save before closing edit mode.

Results

The property control is added to the text area. You can now use the property control to change the value of the property, and if the property is used on an axis, this can let you choose which product type to look at in a visualization.

See also Using document, data table or column properties in an analysis for more specific examples using property controls.