Category Archives: IronPython

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.
    open_dl
    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.
    load_el
    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: