Warning when upgrading to Spotfire 10

TIBCO has deprecated the JQueryUI Javascript library in the latest Spotfire 10.0 release

TIBCO Community pages show us how to use JQuery properly

Extract filtered rows to an html table

#get list of filtered rows
dataTable = Document.ActiveDataTableReference
rows = Document.ActiveFilteringSelectionReference.GetSelection(dataTable).AsIndexSet()

#generate html table
#generate html head
html = " <TABLE id='myTable'>\n"
html += " <THEAD>\n"
html += "  <TR>"

#generate html header
for column in dataTable.Columns:
   html += "<TH>" + column.Name + "</TH>"
html += "  </TR>\n"
html += " </THEAD>\n"

#generate html rows
html += " <TBODY>\n"
for r in rows:
   html+="  <TR>"
   for column in dataTable.Columns:
      html += "<TD>" + column.RowValues.GetFormattedValue(r) + "</TD>"
   html+="  </TR>\n"

#finish html
html += " </TBODY>\n"
html += "</TABLE>\n"

#show results
print html

No comments: