Jump to content

I want to be able to create an input property that a user can use to limit the values in a property control.


Manoj Chaurasia

Recommended Posts

I want to be able to create an input property that a user can use to limit the values in a property control. For example, I want a multi-select list box property with customer names. I want the user to be able to enter a value in an input property and click search...and have it limit the available names. I've seen an example of this for column names, but not values within a column. Any help on writing the script would be appreciated.
Link to comment
Share on other sites

  • 1 year later...

This is as far as I've gotten: from Spotfire.Dxp.Data import DataPropertyClass

import re

patternString = re.compile (pattern)

from Spotfire.Dxp.Data import IndexSet

from Spotfire.Dxp.Data import RowSelection

from Spotfire.Dxp.Data import DataValueCursor

from Spotfire.Dxp.Data import DataSelection

rowCount = Document.ActiveDataTableReference.RowCount

rowsToInclude = IndexSet(rowCount,True)

cursor1 = DataValueCursor.CreateFormatted(Document.ActiveDataTableReference.Columns["DealerName"])

rowstoFilter=Indexset (rowCount, False)

Link to comment
Share on other sites

I have done this before through adding calculated fields instead of scripting. This is particularly useful when you want the user to be able to change the filter criteria.

(1) create a drop down selection box with the column names that you want the user to be able to filter the customer name selection (e.g. Dealer, State, etc..) "SearchField"

(2) create your input field property control "UserInput"

(3) create a calculated column [FilteredCustomers]

if(find(DocumentProperty("UserInput"),[${SearchField}])>0, [Customer Name])

(4) create your property control multi-select box based on the [FilteredCustomers] column.

Link to comment
Share on other sites

  • 3 years later...

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