Change filters programatically

    from Spotfire.Dxp.Application.Filters import CheckBoxFilter

    #get a reference to a filter as checkbox
    filt=Document.FilteringSchemes[0].Item[myDataTable].Item[myDataTable.Columns.Item["Region"]].As[CheckBoxFilter]()

    #uncheck all
    filt.IncludeEmpty = False #make sure to clear the empty values
    for value in filt.Values:
      filt.Uncheck(value)

    #check one
    filt.Check("Asia") 
    Previous
    Next Post »