title: Spotfire updating data on demand table
body: <p>I need to update a data on demand data table on spotfire. Is there a way to do it over script? I have looked into multiple pages to use the refresh function, but it doesn't seem to work either through the script or when I do it manually through the data table properties. Here are the links that i looked at:</p>
  
  <p><a href="https://stackoverflow.com/questions/44925626/spotfire-create-button-to-start-loading-data-instead-of-using-load-data-on-dem">Spotfire: Create button to start loading data ,instead of using load data on demand</a></p>
  
  <p><a href="https://datashoptalk.com/trigger-on-demand-queries-ironpython/" rel="nofollow noreferrer">https://datashoptalk.com/trigger-on-demand-queries-ironpython/</a></p>
  
  <p><a href="https://community.tibco.com/wiki/how-refresh-or-reload-data-using-ironpython-script-tibco-spotfire" rel="nofollow noreferrer">https://community.tibco.com/wiki/how-refresh-or-reload-data-using-ironpython-script-tibco-spotfire</a>.</p>
  
  <p>Here is my code that I used, in case I am missing something. </p>
  
  <pre><code>from Spotfire.Dxp.Data import DataManager,DataTable
  from Spotfire.Dxp.Application.Scripting import ScriptDefinition
  from System.Collections.Generic import Dictionary,List
  from System.Collections import ArrayList
  from Spotfire.Dxp.Framework.ApplicationModel import NotificationService
  import clr
  
  table=List[DataTable]()
  table.Add(Document.Data.Tables["test"])
  Document.Data.Tables.Refresh(table)
  </code></pre>
  
  <p>The version of spotfire that I am using is 7.11. The main issue that the selection on the main data table does not affect the data on demand tables at all. Thank you</p>