Jump to content

How to reset Drop-down List to a selected value after running "Tag from Drop-down" List Script


Izaskun Zubizarreta 3

Recommended Posts

Hi

I have an IronPython Script that assings a value selected froma Drop-down list in a Text Area, to a Calculated Column ("Score", created using a Tag), for the marked row (see dxp file attached that shows the detail). The current limitation of the script is reseting the Drop-down list value to "None", after the Script has run and assigned the selected value in the Drop-down list to the marked row "Score" column. The Drop-down list value stays with the previosuly selected value, but I need for this to go back to "None" (or any other desired value).

I tried adding the following at the end of the Script, but it is not working:

Document.Properties["Score"]=' '

Can anyone suggest howcan I achieve this please

Thanks

Izaskun

PD: I am using Tibco Spotfire Version 11.0.0.40

***********************************************************

Script:

***********************************************************

from Spotfire.Dxp.Data import DataColumn, TagsColumn

from Spotfire.Dxp.Data import DataPropertyClass, DataType, DataValueCursor, IDataColumn, IndexSet

from Spotfire.Dxp.Data import RowSelection

from System import Array

from System.Collections.Generic import *

markedRowSelection = Document.ActiveMarkingSelectionReference.GetSelection(Document.ActiveDataTableReference)

table = Document.ActiveDataTableReference

myTagColumn = table.Columns.Item[TagCol].As[TagsColumn]()

CommentArray = myTagColumn.TagValues

CA = set(CommentArray)

myTagColumn.TagValues = List[str](CA.union([strTag]))

myTagColumn.Tag(strTag, markedRowSelection)

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