I have a html page which i display a spotfire report in using the web player. I would like to have the option of refreshing the data by pressing a button i create, and i couldnt find a way to do that using the web player. I know there is a way to do this using script in iron python but i dont understand how exactly it works, i mean, when i click the button i would like the script to run. Where do i write it? How do i call it? My html page controller (im using angular) is in java script. Thanks :)
Asked
Active
Viewed 1,636 times
1 Answers
2
Can't create python scripts in webplayer as far as I know. You need the client. There you can create a Text Area and add an Action Control. Select 'Script' (requires scripting privileges to be able to write code in python) and code to refresh the data table:
myDataTable.Refresh()
myDataTable is a script parameter that points to your visualization data table.

jleviaguirre
- 686
- 6
- 10
-
Thank you so much! And if i have more than 1 spotfire reports and i would like to have the same script in all of them, can i fo that? – Dana S Feb 02 '16 at 06:15
-
1There is a way to import script so you don't have to re-write them. Use script parameters to make them as versatile and reusable as possible. scripts are embedded in dxp files so when you import them, you can pick and choose what script to use. You could have a scripts.dxp with all your script collections to funge as a library or just google. When I started scripting they were hard to find, so I created a blog, which I hope you find it useful: http://spotfired.blogspot.com – jleviaguirre Feb 03 '16 at 16:05