简体   繁体   English

如何在Spotfire的文本区域中创建动态过滤器

[英]how to create dynamic filter in text area of spotfire

I want to create a dropdown in text area to filter data in table dynamically. 我想在文本区域中创建一个下拉列表,以动态过滤表中的数据。

I have many entries under Filter "Task Description". 我在“任务描述”过滤器下有很多条目。

But I want to create a dropdown in text area with only below three entries out of all entries. 但我想在文本区域中创建一个下拉列表,其中所有条目中只有三个以下。

  • All - it will show the entire data 全部-将显示整个数据
  • Prasanta - this selection will only show Prasanta related rows Prasanta-此选择将仅显示与Prasanta相关的行
  • Chandan - this selection should only show Chandan related rows. Chandan-此选择仅应显示与Chandan相关的行。

Is it possible? 可能吗?

the best and simplest way to do this is with a Text Area visualization containing a Property Control . 最好的和最简单的方法是使用包含属性控件文本区域可视化。 I'll give you a loose outline and you can use the Spotfire help on Property Controls to get more detail. 我会给您一个宽松的轮廓,您可以使用Property Controls上Spotfire帮助获得更多详细信息。

  1. add a new Property Control of type Drop-down list to a Text Area 文本区域添加类型为下拉列表的新属性控件
  2. create a new Document Property of type string 创建一个新的字符串类型的文档属性
  3. set the property value through Expressions 通过表达式设置属性值
  4. the expressions you list here should evaluate to boolean true or false. 您在此处列出的表达式的计算结果应为布尔值true或false。 for example, for Prasanta rows you might use [Task Description] = "Prasanta" . 例如,对于Prasanta行,您可以使用[Task Description] = "Prasanta" the expression for All rows should be blank. 所有行的表达式应为空。
  5. on the Data page of the filtered visualization's Properties, scroll down to Limit data using expression and click Edit... 在已过滤的可视化文件的“属性”的“ 数据”页面上,向下滚动到“ 使用表达式限制数据” ,然后单击“编辑...”。
  6. from the middle pane, double click the name of the Document Property you created in step 2 above 在中间窗格中,双击您在上面的步骤2中创建的文档属性的名称
  7. test by selecting different items from the dropdown you created 通过从创建的下拉菜单中选择其他项目进行测试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM