Script to refresh table on WEB API

Hello,

I´m trying to create an IronPython  script to Refresh a data Table. The on I did is working just fine on the desktop application, the issue is when my user tries to refresh it on the web interface. Wghen i click on the button to run the script it briefly tries to run it but shows the error message "Could´t Run perform the action "Refresh" - It was not possible to execute the script 'Refresh Table': prompting inside a transactions is only allowed when the transaction is contained in a progress operation.

The Scripts I´m Trying to run are like this:

from System.Collections.Generic import List, Dictionary
from Spotfire.Dxp.Data import DataTable
from System.Collections import ArrayList

tables = ArrayList()
Document.Data.Tables["ExternalData - Assets"].ReloadAllData()
if table.IsRefreshable and table.NeedsRefresh:
   table.Refresh()

and

from System.Collections.Generic import List, Dictionary
from Spotfire.Dxp.Data import DataTable
from System.Collections import ArrayList

tables = ArrayList()
Document.Data.Tables["BaseDadosExternos - Debentures"].ReloadAllData()

I don´t know exactly the difference between then, but they both work fine on the desktop. Does anyone knows hot to make it work?

Thanks very much

 

 

3 Comments

BTW, the data table i´m trying to refresh is located on my local network instead of a information link on the library.

rsuevo - Oct 25, 2019 - 5:55am

No propt asking for action (if that is what you meant) but it shows the "Progress Title" window with the progress bar wich is one of my objectives.

rsuevo - Oct 24, 2019 - 1:11pm

When you run the script in analyst client does it prompt any dialog when reloading?

Shandilya Peddi - Oct 23, 2019 - 7:55am
View More Comments + Add a Comment

(1) Answer

Login