Category Archives: Property controls

IronPython script to clear properties

This script clears other properties when selecting/changing a property, so for instance if a user clicks on a propery listbox other property listboxes will be cleared.

How to use:
When you create a new property press the script button and add the script above. Next add a script parameter ‘propertyNames’ as a string and set the properties you want to clear.
In the script parameter ‘propertyNames’ you can add the names of one or multiple properties to clear. If you use multiple names separate them with a comma.


Automatically start an IronPython script

Every time a user will navigate to this page an IronPyton script will be executed.
The trick is to add a drop-down list property and use some Javascript to trigger the change event of the drop-down list.

  1. Create a drop-down list property.
    1. Add a drop-down list property.
    2. Set a script for the property.
    3. Add some fake data, atleast 2 rows.
  2. Next add a Javascript to the HTML/text area.
    4. Copy the ID of the spotfire element (you need this in the javascript).
    5. Add a new javascript and use the copied ID.
    6. Use the following javascript to do the trick:

Change the contents of a property depending on another propterty

In this example there is a date dimension property with the option to select quarter or month. By selecting quarter or month the list box below will change the values.


This can be done by:

  1. Create a drop down list, create fixed values with a display name and a value. The value should be equal to the column name you want to read the values from.
    The name of the property is ‘PropertyDateDimension’.
  2. Add a calculated column to your table and use the following formula, lets call it ‘dimension’.
  3. Create a multiple select list box.


Use a multiple select list box to filter visualizations (or use in a calculated column)

For example you have a list box (multiple select) which contains multiple quarters.multiple_select1

By selecting one or multiple quarters the data table next to it has to be filtered.

The trick is to switch the statement and use a regular expression because the user can select multiple items and the formula needs to be able to compare that. Go to you visualization properties and add the formula bolow to ‘Limit data using expression’.


Or if you want to show all when nothing is selected.