Business Intelligence Tools

A Different Way to Build Drop-Down Property Controls

  • Does adding new columns to a data table “contaminate” your drop down property controls?
  • Would you prefer to not have to create column properties for drop-down controls in addition to the document property?
  • Would you like to learn a property control hack?

Fairly early on in learning Spotfire, I took the TIBCO Advanced Configurations online training, which is where I learned how to build property controls.  Now, TIBCO puts as much into their training as they can, but they can’t teach you all the tricks at once, especially when it comes to property controls.  There is just too much to learn.  What I am going to demonstrate in this post is a drop-down property control hack I learned from a coworker.

How Most of Us Create Drop Down Property Controls

First, let’s review how to create a drop-down property control and use it on a visualization.

  1. Add a text area to the page.
  2. Toggle the text area into Edit mode by right-clicking and selecting either Edit HTML  (my preference) or Edit Text Area.
  3. Click the Insert property control button, and select Drop down from the list.
  4. In the next dialog, click New.
  5. Name the property control and select the data type (most likely String).
  6. Click OK.
  7. In the “Set property value through:” drop-down, select Column Selection. 
  8. Click the Select Columns button in the bottom right.
  9. Click the New button to create a new column property.
  10. Name the property.  The data type is boolean.  Here is a blog post I wrote on the difference between setting the default value to true or false.  I usually set to false.
  11. Click Ok.
  12. Select the columns that you would like to appear in the drop-down.
  13. Click Ok until out of all dialogs.
  14. Go to the column selector that you want to attach the property control to, such as the Color By selector.  Right-click on it and choose Set from Property.
  15. Select the property control from the list.

BAM!  Done.  However, trouble arises when new columns are added to the table.  They sometimes show up in your property controls.  So, let me show you another way to create the drop down property control where you can rest assured new columns won’t infiltrate the property control.


Hack It Like a Pro

Follow all steps thru step 6. Then,…

  1. In the “Set property value through:” drop-down, select Fixed Values. 
  2. Enter the values as you would like them to appear in the Display Name text field.  Enter the EXACT column names in the Value field. 
  3. Now pick up on step 14 above, and you have a drop-down property control whose columns won’t change no matter what happens to the data table.

Spotfire Version

I used Spotfire 7.12 to create this content.


10 thoughts on “A Different Way to Build Drop-Down Property Controls

  1. Sanjeevakumar D V Reply

    Hi Julie,

    Thanks for the useful tips about Spotfire.

    I want to learn ironpython for spotfire from basics, so could you please send me some document or website details for the same.


  2. Ash Mishra Reply

    Is it possible to add “Select all” and select all of them at once? Sometimes you may have stack bar of multiple categories you may prefer to have an option to either pick all or pick one.

    • Julie Sebby Post authorReply

      In that case, you would be using a list box multiple select property control and not a drop-down property control. You might be able to use “Expression” instead of “Fixed Values” and then use $esc and $map to map in a select all option. I haven’t tried doing that, but I would think it is possible.

  3. Arjoo Sharma Reply

    Hi Julie,

    Could you please help me for customize selection of dropdown value.
    I want dropdown to be selected by-default for current month every time

    • Julie Sebby Post authorReply

      Technically, within property controls, there isn’t a way to set the default value for a drop down. However, there are a couple work arounds depending on how you are populating the drop down. If you are using column values, you can create a custom sort order in column properties, sort tab, click the custom button. If you are using column names, just add them to the drop down in the order you want them to appear. In using fixed values, you can still set the order when you create the drop down.

Leave a Reply

Your email address will not be published. Required fields are marked *