Search code examples
spotfire

Force user to select only one value from filter spotfire


Is it possible to force the user to select only one value from a filter ?

For a radio button filter as below, is it possible to remove the buttons all & none and make sure that only one Choice is selected ?

enter image description here


Solution

  • you cannot change the existing filter features or functionality without developing a custom extension for a new filter control.

    that said, you can certainly emulate a filter using what's called a Property Control and a Data Limiting Expression. for single selection, you're stuck with either a Dropdown control or a Listbox (single select) control.

    you would need to...

    1. create a Text Area Visualization on the page somewhere
    2. insert a Listbox or Dropdown Property Control into the Text Area Visualization
    3. create a Document Property with the same data type as your filter column and associate it to the Property Control. you can set this to Unique Values in Column or write in your own Fixed values.
    4. open the Properties dialog on the visualization you'd like to filter and navigate to the Data page
    5. scroll down to Limit Data Using Expression and use an expression like [MyFilterColumn] = "${MyDocumentProperty}" (quotes are required for string values; if numeric then omit quotes)