Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ironpython 是否要获取日期范围筛选器值?(最小值和最大值)_Ironpython_Spotfire - Fatal编程技术网

Ironpython 是否要获取日期范围筛选器值?(最小值和最大值)

Ironpython 是否要获取日期范围筛选器值?(最小值和最大值),ironpython,spotfire,Ironpython,Spotfire,我使用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[HtmlTextAr

我使用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) #确保导入ValueRange类 从Spotfire.Dxp.Application.Filters导入范围过滤器,ValueRange #获取引用并强制转换筛选器 rf=pg.FilterPanel.TableGroups[0].GetFilter(“过滤器名称”).FilterReference.As[RangeFilter]() #拉动过滤器的当前选择 当前值范围=射频值范围 #返回包含最小和最大筛选值的元组 打印当前\u值\u范围 #extend()将元组中的每个项追加到列表中 #您还可以像当前值范围[1]一样单独访问它们 列表.扩展(当前值范围) 有关此信息的来源和更多信息,请访问