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.

 

Guest Spotfire blogger residing in Whitefish, MT.  Working for SM Energy’s Advanced Analytics and Emerging Technology team!

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

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

    Regards,
    Sanjeev

    1. There aren’t a lot of comprehensive resources out there for learning IronPython for Spotfire. There are resources for Python and for Spotfire, but what your asking for doesn’t really exist. TIBCO has an IronPython course that I took last year, but it’s VERY dated. You might try starting with the API reference (link below). Ruths.ai has several blog posts on IronPython, which you can search for using tags on the right. This blog — http://spotfired.blogspot.com/ — is also a good resource.

      https://docs.tibco.com/pub/doc_remote/sfire_dev/area/doc/api/TIB_sfire-analyst_api/Index.aspx?topic=html/T_Spotfire_Dxp_Application_Extension_CustomVisualView.htm

Leave a Comment

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