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/