Aditya Singh 3 Posted March 31, 2020 Share Posted March 31, 2020 I have a requirement where I am changing current from Dollar to Euro and other currenciesbased on drop down selection. Is there any wayto change the current unit for column name to change dynamically based on selection. Link to comment Share on other sites More sharing options...
Shashank Gurnalkar Posted March 31, 2020 Share Posted March 31, 2020 You can refer to the following script which changes the column name with the value from the dropdown. from Spotfire.Dxp.Data import * from Spotfire.Dxp.Application.Visuals import * tablePlot = vis.As[TablePlot] ()# vis is a script parameter myTable = Document.Data.Tables["SalesAndMarketing"] currName=Document.Properties["currName"] myTable.Columns[currName].Name=Document.Properties["newName"] Document.Properties["currName"]=Document.Properties["newName"]You need to create a document property (currName) and assign the value to it with the column name that you want to change. After that, again create a new document property(newName) that is linked to your dropdown. Now associate this newName to the IronPython script. You can refer to the attached analysis file. Link to comment Share on other sites More sharing options...
Aditya Singh 3 Posted April 6, 2020 Author Share Posted April 6, 2020 Thanks Shashank, this helped me to use the if else condition for my requirement because I had multiple selections in dropdown. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now