Ajey Kumar Posted October 27, 2017 Share Posted October 27, 2017 Hello All, Q1) Does someone know, how to trigger javascript function only when a change occurs in page/tab of a dashboard in Spotfire. I have below JS which triggers every time duration of 1000 millseconds but I want it to trigger only when there is a change only. Bcoz of this, the page is refreshing every now and then and it is impacting performance. JS Function: $(function() { setInterval( function() { $("#load :first-child").click(); }, 1000); }); Q2) Is there a way to read the selected valuefrom a regular listbox filter rather thanall values into javascript. I trieddifferent ways but it always shows all the existingvalues in listbox filter. Please help/provide any solution for theabove 2 questions. Link to comment Share on other sites More sharing options...
Sayali Patil Posted January 16, 2019 Share Posted January 16, 2019 Hello, 1)It is not possible to trigger the javascript on all changes in the page/tab. For Filtering/marking changes can be captured in a data function ,which can be mapped to a document property and the javascript triggered on this document property change. 2)Here is a sample script to get the selectedvalues of a list box filter.These can be stored in a document property that can be used in javascript from Spotfire.Dxp.Application.Filters import ListBoxFilter myDataTable=Document.Data.Tables["Countries"] filt=Document.FilteringSchemes[0][myDataTable][myDataTable.Columns["country"]].As[ListBoxFilter]() for value in filt.SelectedValues: print value 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