0

My script is to hide some pages for the some login User. My script get trigger well in Client not in Webplayer. To trigger this script i created the Data function property with Input and output parameter.

Input parameter as sysdate output assigned to document property where below script is present.

import Spotfire.Dxp
from Spotfire.Dxp.Data import * 
table=Document.Data.Tables["RestrictedSSO"]
minCol=table.Columns['GROUPNAME']
minCursor=DataValueCursor.Create(minCol)
for row in table.GetRows(minCursor): 
    Document.Properties["UserGroup"]= minCursor.CurrentValue;
    if Document.Properties["UserGroup"]=="Restricted":
        for Page in Document.Pages:
            if Page.Title == "ABCD":
                Document.Pages.Remove(Page)
            if Page.Title == "EFGH":
                Document.Pages.Remove(Page)
magickk
  • 19
  • 1
  • 5

2 Answers2

0

First check if there is a URL specified for the TERR Engine. A default setting might work in the client and not in the webplayer, so specifying the URL can ensure it works in both Client and Webplayer.

If that still does not help you can choose to initiate the python script via Javascript instead of the TERR sysdate output : https://community.tibco.com/wiki/how-trigger-python-script-report-load-javascript-tibco-spotfire

Tyger Guzman
  • 748
  • 5
  • 13
  • You can also run your R sript in the client, but against the server version of TERR, not the local version. This may tease out any errors/issues. – Mark P. Jul 09 '20 at 12:03
0

When using TERR Check whether you have have checked refresh automatically and unchecked allow cache from script in data function.

Run terr on server rather than run locally.

Go to file-> Document properties -> uncheck Remember personalized view for each web client user.

Even after doing the above steps if it didn't worked , then you can also go with java script.

aavin
  • 1
  • 1