Jump to content

IronPython Script to remove rows based on criteria

Vincent Thuilot 2

Recommended Posts


I would like to run a script which is removing rows from a table based on a column called "UserCheck" generated via a transformation.

Here is the script:


from System import Environment, Threading

username = Threading.Thread.CurrentPrincipal.Identity.Name

Document.Properties["username"] = username

from Spotfire.Dxp.Data import DataValueCursor,RowSelection,IndexSet

from System import Convert






for row in myTable.GetRows(Userlist):

if ["UserCheck"]"Yes":rowsToFilter.AddIndex(row.Index)



For the moment it is removing every rows and I can't make it only removing rows for which the column 'UserCheck" is not"YES"

Any idea


Thanks a lot


Link to comment
Share on other sites

  • 2 years later...

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...