简体   繁体   中英

Spotfire updating data on demand table

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:

Spotfire: Create button to start loading data ,instead of using load data on demand

https://datashoptalk.com/trigger-on-demand-queries-ironpython/

https://community.tibco.com/wiki/how-refresh-or-reload-data-using-ironpython-script-tibco-spotfire .

Here is my code that I used, in case I am missing something.

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)

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

The script looks good and it should work as expected. however, when you use the script to reload the on-demand table just make sure that the checkbox - "Load automatically" and "Allow caching" are unchecked in on-Demand Settings.

Regards, Ankush

So, I am not sure if this was updated in future versions, but I got a response from the company saying that mine would not be able to do it. The way I got around it was creating a marking that was only being used to update the data on demand tables from the original table. I then created a script to update these markings to match the marking that I was using normally. This way you can still mark things on the table and then have a button that will update the data on demand tables individually. It is important that each data on demand table gets its own marking that will be updated through the script.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM