Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

How to Show unique values from a column which is unmarked


Sanandh C k

Recommended Posts

Here is the Answer for above question:

from System.Collections.Generic import List

from Spotfire.Dxp.Data import *

cursor = DataValueCursor.CreateFormatted(dataTable.Columns["City"])

markings = Document.ActiveMarkingSelectionReference.GetSelection(dataTable)

rowCount=dataTable.RowCount

MarkedRowIndex=List[int]();

markedata = List [str]();

for i in markings.AsIndexSet():

MarkedRowIndex.Add(i)

print MarkedRowIndex #RowIndex

for row in dataTable.GetRows(cursor):

if row.Index not in MarkedRowIndex:

print row.Index

value= cursor.CurrentValue

if value str.Empty:

markedata.Add(value)

valData = List [str](set(markedata))

SelectedValues= ', '.join(valData)

 

print SelectedValues

Document.Properties["SelectedValues"]=''

Document.Properties["SelectedValues"]=SelectedValues

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