热门获取日期范围过滤器值? (最小值和最大值)

Hot to get date range filter value? (min and max)

我使用 IronPython 脚本从一些过滤器中获取一些值(都是 ListBoxFilter) 请看下面的代码

from Spotfire.Dxp.Application.Filters import *
from Spotfire.Dxp.Application.Visuals import HtmlTextArea
from System import DateTime
from Spotfire.Dxp.Data.DataType import Date

html.As[HtmlTextArea]().HtmlContent=""

list=[]
GRF=pg.FilterPanel.TableGroups[0].GetFilter("GEOGRAPHIC_REGION").FilterReference.As[ListBoxFilter]()
for value in GRF.SelectedValues:
    if value.find(',')!=-1:
    list.append(value)
PTF=pg.FilterPanel.TableGroups[0].GetFilter("PROCEDURE_TYPE").FilterReference.As[ListBoxFilter]()
for value in PTF.SelectedValues:
    if value.find(',')!=-1:
    list.append(value)

如果我想获取范围过滤器的值(最小值和最大值)并将它们(最小值和最大值)添加到列表中的一项,如何编码?请帮忙

要获取范围过滤器的值,请使用以下代码段:

# make sure to import the ValueRange class
from Spotfire.Dxp.Application.Filters import RangeFilter, ValueRange

# get reference for and cast the filter
rf = pg.FilterPanel.TableGroups[0].GetFilter("FILTER_NAME").FilterReference.As[RangeFilter]()

# pull the current selection of the filter
current_value_range = rf.ValueRange

# returns a tuple containing the min and max filtered values
print current_value_range

# List.extend() will append each item in the tuple to the list
# you can also access them individually like current_value_range[1]
list.extend(current_value_range)

来源和更多信息在 https://docs.tibco.com/pub/doc_remote/spotfire/7.6.0/doc/api/html/T_Spotfire_Dxp_Application_Filters_RangeFilter.htm