Unofficial Spotfire Collection of Spotfire Script Snippets
TIBCO Community pages show us how to use JQuery properly
You could also use a string replace command. Would be useful for an if statement based on a document property.from Spotfire.Dxp.Application.Visuals import HtmlTextAreavis = ta.As[HtmlTextArea]()str = vis.HtmlContentstr = str.replace("Apple","Banana")vis.HtmlContent = str
copy/pasting exactly the original script (only changing the name of my document property) i get the following error:Traceback (most recent call last): File "Spotfire.Dxp.Application.ScriptSupport", line unknown, in ExecuteForDebugging File "", line 2, in NameError: name 'ta' is not definedhow can this be fixed? thank you so much!
Phillip, ta is a script parameter that points to a text area. The script above replaces the entire content of the text area. As jeff said, you can replace portion of it by using a replace function.
Post a Comment