Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
How to Create a Dynamic Filter in a Text Area in TIBCO Spotfire
Solution:
Setting property values through expressions you can create a dynamic filter which uses only some of the values from the original filter and use it to limit data in a visualization. Consider a Column CarMake with the following values.
CarMake |
Honda |
Ford |
Tesla |
Jaguar |
BMW |
Say we want to create a dynamic filter with only three of these car makers. The out of the box "Insert Filter" option available in a text area does not allow us to filter the values to display to the user. Here we can make use of a property control and make use of expressions to set values to achieve the desired result.
Steps to create a dynamic Filter:
1. Create a new, or in an existing Text area add a new Property Control of type Drop-down list, say "dynamicFilter".
2. Set the property value through Expressions.
The expressions you list should evaluate to boolean true or false. for example,
To include Tesla rows use [CarMake] = "Tesla"
To include Jaguar rows use [CarMake] = "Jaguar" and so on
The expressions would look something like -
3. On the Data page of the required visualization's Properties, scroll down to Limit data using expression and click Edit...
4. From the "Available Properties for column", double click the name of the Document Property created ("dynamicFilter") in step 2 above so that the limiting expression would look like - ${dynamicFilter}
5. Test by selecting different items from the drop-down control. Doc: Details on Property Control Doc: Table Properties – Data
Comments
0 comments
Article is closed for comments.