Georgi Koemdzhiev Posted September 26, 2019 Share Posted September 26, 2019 Hello, I am trying to figure out if there is a way to inject search expression intoa ListBoxFilter in my analysis file using only the WebPlayer's JavaScript API (https://t.ly/bmzvG). For example, in my analysis file, I have a ListBoxFilter called "API - 14/UWI Unformatted" (see attached image). I would like to allow the user to paste a list of values - "value1, value2"into a textarea html element that is on the same page as the Spotfire WebPlayer itself. Then, a javascript code will format the list of values so that they are separated by "or" (e.g. value1 or value2, the ListBoxFilter accepts that expression and will select both value1 and value2 from the list). Could anyone please confirm if the JavaScript allows access to a specific filter in the opened analysis document so that I can set its searchfield with the formated text Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted September 26, 2019 Share Posted September 26, 2019 The JavaScript in text area does not have access to the filters. One workaround would be to set the formated values to a document property and then trigger an IronPython script to set the search expression for the ListBoxFilter using the value in the document property. Below are some references, https://docs.tibco.com/pub/doc_remote/sfire_dev/area/doc/api/TIB_sfire-a... https://community.spotfire.com/wiki/how-get-or-set-specific-filter-using-ironpython-script-tibco-spotfire Link to comment Share on other sites More sharing options...
Georgi Koemdzhiev Posted September 27, 2019 Author Share Posted September 27, 2019 Thank you for your answer. That sounds like it's going to work. Thanks :) 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