Elsa Zehra Posted March 9, 2023 Share Posted March 9, 2023 The issue is with the script because when I exclude the script from dashboard it opens fine from front end.The script is as follows:# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license.from System import Arrayfrom Spotfire.Dxp.Data import IndexSetfrom Spotfire.Dxp.Data import DataValueCursor# Get tabletbl= Document.Data.Tables["Pre-Submission_Spend_Outliers"]# Get access to the Column populating the choice values# of the drop-down list controlchoicesCol = tbl.Columns["stringfilter"]rowCount = tbl.RowCountrowsToInclude = IndexSet(rowCount,True)# Create a cursor to the Column we wish to get the values fromcursor1 = DataValueCursor.CreateFormatted(choicesCol)# Create Array object that will hold valuesstrArray = Array.CreateInstance(str,rowCount)# Loop through all rows, retrieve value for specific column,# and add value into arrayfor row in tbl.GetRows(rowsToInclude,cursor1): rowIndex = row.Index value1 = cursor1.CurrentValue strArray[rowIndex-1] = value1 # Get only unique Values, cast to a listuniqueVal = list(set(strArray))# Order listuniqueVal.sort()# Set document property to first value found in the listDocument.Properties["stringDrop"] = uniqueVal[1]#Navigate to new page#Iterate over the pages and navigate to the page if it is named "Page Name"for page in Document.Pages: if (page.Title == "Outliers"): Document.ActivePageReference=page Link to comment Share on other sites More sharing options...
Andrew Berridge Posted March 10, 2023 Share Posted March 10, 2023 Hi Elsa,I've looked through the script and I can't see anything immediately obvious that would cause the file not to open in Spotfire Consumer (web). However, is this script being triggered by the change of a document property or some other mechanism, that's causing it to be executed when the file is loaded? It's hard to understand why it would be causing an error when loading, unless it is somehow being executed during the loading. Can you reply back, indicating how the script is being triggered? If it is being triggered during loading, can you disable this, and try executing it just using a button, and see if it works OK?Thanks,Andrew Link to comment Share on other sites More sharing options...
Elsa Zehra Posted March 13, 2023 Author Share Posted March 13, 2023 Thanks Andrew for reviewing my script.As for your question, the script is triggered through a button. When a user clicks on a button, the script executes and will select the first value from the drop down property control.I disabled the script of button and loaded the dashboard. It loaded fine then. So it was clear that the issue is because of script. Also, when I embed the data in the analysis, it loads fine too.Can you please let me know if this is something related to rights or something that is preventing the dashboard from opening on web layer?Because dashboard is loading fine in Spotfire but giving error when opening on web layer. PFA the issue that pops up. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now