Jump to content

Is there a way to add a dropdown for filtering schemes in text areas? Or a way to have a selection box that adjusts multiple filters based on what's selected?


Taylor Douthitt 3

Recommended Posts

I am trying to make a dashboard that allows you to simply select the month of data you would like to pull (in a text area), and it automatically adjusts other filters based on that selection. I'm assuming this would have something to do with filter schemes I would need to set up. Thank you for any help (I ask about text area bc for some who are new to Spotfire, the filter scheme option may be a little hard to find)

Link to comment
Share on other sites

Hello,

Here's a quick example of setting filtering schemes.

I have a drop-down list tied to the document property propFilteringScheme that contains the names of the selected filtering scheme. To set the scheme, I use this IronPython script:

SetFilteringScheme

=====================

from Spotfire.Dxp.Application.Filters import *

propFilteringScheme = "propFilteringScheme"

fScheme=None

#get the required FilteringScheme

for fs in Document.FilteringSchemes:

  if fs.FilteringSelectionReference.Name == Document.Properties[propFilteringScheme]:

   fScheme= fs

#get the filter panel of current active page

myPanel = Document.ActivePageReference.FilterPanel

myPanel.FilteringSchemeReference=fScheme

------

(Update: After further research, I have edited the following section)

There is currently no way to dynamically set the available options (e.g. to populate the list with the currently filtering schemes when the analysis is opened) - covered by the Idea https://ideas.tibco.com/ideas/SPF-I-330 in the TIBCO Ideas Portal - so you will need to "hard code" the options you want to have available in the drop-down list (using Set Property value though "Fixed values", and list the names of the filtering schemes to include). 

FilteringScheme.thumb.gif.de4dc9271d8390c6e8a2525a9a5a6160.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...