有人可以提供鐵python腳本來創建多個選擇列表框過濾器(帶有搜索選項)。當我點擊嵌入腳本的按鈕時,應該過濾我的儀表板頁面中顯示的所有四個數據表的數據。用於在spotfire中創建過濾器的鐵python腳本
我寫了一些腳本,但它工作,如果只有一個數據表目前,我正面臨一些錯誤,當我嘗試應用多個數據表中的數據過濾器。
from Spotfire.Dxp.Application
import Filters as filters
CurPanel = Document.ActivePageReference.FilterPanel
FilterA = CurPanel.TableGroups[0].GetFilter("columnname")
CheckBoxes = FilterA.FilterReference.As[filters.CheckBoxFilter]()
strCityL = Document.Properties["propertyname"]
for CheckBoxVal in CheckBoxes.Values:
CheckBoxes.Uncheck(CheckBoxVal)
for strVal in strCityL:
CheckBoxes.Check(strVal)
上面的腳本是一個數據表,我不能搜索我的過濾器值
感謝
請提供Spotfire.Dxp.Application進口過濾器,你有迄今腳本:) – scsimon
作爲過濾 CurPanel = Document.ActivePageReference.FilterPanel FilterA = CurPanel.TableGroups [0] .GetFilter( 「列名」) 的CheckBox = FilterA.FilterReference.As [filters.CheckBoxFilter]() strCityL = Document.Properties在CheckBoxes.Values [ 「PROPERTYNAME」] 爲CheckBoxVal:CheckBoxes.Uncheck(CheckBoxVal) 用於strVal在strCityL: \t CheckBoxes.Check( strVal) 上面的腳本是針對一個數據表的,我無法搜索我的過濾器值。 –
我不是偉大的鐵IronPy通過何塞和其他一些人。這是一個很好的鏈接。 http://spotfired.blogspot.com/2014/03/change-filters-programatically-from.html 這是他的個人資料http://stackoverflow.com/users/922290/jleviaguirre @jleviaguirre – scsimon