当我单击 Cross table (Spotfire 7.11) 中的任何单元格时,我想导航到所需的页面

I want to navigate to the desired page when I click on any cell in Cross table (Spotfire 7.11)

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]

这会处理脚本。现在十字table。 Spotfire 不允许响应点击十字 table。为此,您需要使用图形 table。您可以使用图形 table 而不是十字 table 创建相同的 table。这有点多工作,因为您需要添加一个计算值轴,然后在轴的操作下连接 IronPython 脚本。