ironpython - 我想在单击交叉表中的任何单元格时导航到所需的页面 (Spotfire 7.11)

标签 ironpython spotfire

from Spotfire.Dxp.Application import Bookmark

from Spotfire.Dxp.Application.AnalyticItems import BookmarkManager

from Spotfire.Dxp.Application import BookmarkComponentFlags

from Spotfire.Dxp.Application import Page

Page1==Document.Properties['PageName']

if Page1="First Year"
Document.ActivePageReference=Document.Pages[1]

https://community.tibco.com/questions/how-navigate-another-page-when-click-cross-table

最佳答案

您的 IronPython 有几个错误。这是一个固定版本。当您从文档属性设置 Page1 的值时,您需要使用一等于而不是二。然后,当您检查 Page1 是否等于“First Year”时,您需要使用两个等于而不是一个。最后,if 语句后需要一个冒号。

from Spotfire.Dxp.Application import Bookmark
from Spotfire.Dxp.Application.AnalyticItems import BookmarkManager
from Spotfire.Dxp.Application import BookmarkComponentFlags
from Spotfire.Dxp.Application import Page
Page1=Document.Properties['PageName']
print Page1
if Page1=="First Year":
    Document.ActivePageReference=Document.Pages[1]

这会处理脚本。现在是交叉表。 Spotfire 不允许响应交叉表上的点击。为此,您需要使用图形表格。您可以使用图形表而不是交叉表来创建相同的表。这需要做更多的工作,因为您需要添加计算值轴,然后在轴的 Actions 下连接 IronPython 脚本。

关于ironpython - 我想在单击交叉表中的任何单元格时导航到所需的页面 (Spotfire 7.11),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56774976/

相关文章:

C#、IronPython 和 Sympy : unicode_escape_decode() takes no arguments

jquery - 创建可在 Spotfire 仪表板的所有选项卡中使用的 float 文档属性控件

Spotfire - 向基于信息链接的数据表添加动态日期限制。点火 6.0.1

python - 从折线获取曲线以创建细节线

python - 循环遍历 Python/IronPython 对象方法

c# - 从外部程序调用 C# 应用程序时未命中断点

python - Spotfire 我可以通过ironpython 脚本输入列吗?

spotfire - 自动化点射

c# - 将 IronPython 集成到 Windows 窗体应用程序中