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

Delete first 10 rows

#dt is a data table script parameter
from Spotfire.Dxp.Data import RowSelection, IndexSet

#select all rows
selection   = IndexSet(dt.RowCount,True)

#mark first 10 rows row as true and the rest false
for r in selection:
   selection[r] = (r<=10)

#delete rows based on selection (rows from indexset marked as true)

1 comment:

Fiona Wang said...

Your post has been helpful!
Also, to delete the Last 10 Row from Table using Iron Python Script:

from Spotfire.Dxp.Data import RowSelection, IndexSet
selection = IndexSet(dtTarget.RowCount,True)
for r in selection:
selection[r] = (r>=(dtTarget.RowCount-10))