Jump to content

My dashboard that is using ironscript is opening fine from Spotfire backend but when it's loading on web it's giving this error. PFA. Can anyone please let me know why is this happening and how to fix this?

Elsa Zehra

Recommended Posts

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 Array

from Spotfire.Dxp.Data import IndexSet

from Spotfire.Dxp.Data import DataValueCursor

# Get table

tbl= Document.Data.Tables["Pre-Submission_Spend_Outliers"]

# Get access to the Column populating the choice values

# of the drop-down list control

choicesCol = tbl.Columns["stringfilter"]

rowCount = tbl.RowCount

rowsToInclude = IndexSet(rowCount,True)

# Create a cursor to the Column we wish to get the values from

cursor1 = DataValueCursor.CreateFormatted(choicesCol)

# Create Array object that will hold values

strArray = Array.CreateInstance(str,rowCount)

# Loop through all rows, retrieve value for specific column,

# and add value into array

for row in tbl.GetRows(rowsToInclude,cursor1):

  rowIndex = row.Index

  value1 = cursor1.CurrentValue

  strArray[rowIndex-1] = value1 

# Get only unique Values, cast to a list

uniqueVal = list(set(strArray))

# Order list


# Set document property to first value found in the list

Document.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"):


Link to comment
Share on other sites

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?



Link to comment
Share on other sites

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.errorIssue.PNG.6732bd5fe9076a16c59a688803349b8d.PNG

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...