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

时间:2018-03-12 06:44:13

标签: ironpython spotfire

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

newNode->next = argNode->next;

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

1 个答案:

答案 0 :(得分:1)

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

# 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

的更多信息