Dirk Korte Posted April 12, 2022 Share Posted April 12, 2022 Hi, I would like to replace a data table from an information link using an Iron Python script. But I need to apply on-demand settings to the script. Would anybody know of any script which can achieve this I have tried the script below, which sucesfully worked to replace a data table using a variable information link from a document property. However, I do not know how to transform this from 'all data at once' to 'Data on demand'. My data table is very large, and loading all of the data slows the report drastically. Many thanks, Dirk ---------------------------------------------------------------------------------------------------------------------------------------- Script: from System import Array,Guid,String,Object, DateTime from Spotfire.Dxp.Data.Import import InformationLinkDataSource, InformationLinkParameter from Spotfire.Dxp.Data import * from Spotfire.Dxp.Data.InformationModel import * #The GUID of the information link to be executed based on document property ILGUI --> two information links. (1 for short term data, other for long term) ilGuid = str(Document.Properties["ILGUI"]) ilDataSource=InformationLinkDataSource(Guid(ilGuid)) ilDataSource.ReuseSettingsWithoutPrompting = False # not sure about this part. ilDataSource.IsPromptingAllowed = False # not sure about this part. Document.Data.Tables["Test"].ReplaceData(ilDataSource) Link to comment Share on other sites More sharing options...
Jose Leviaguirre Posted April 12, 2022 Share Posted April 12, 2022 Hello Dirk, Why would you like to replace a Data Table with an Iron Python script and not directly with the tool In any case, you can find the API of the InformationLinkDataSource Class here Link to comment Share on other sites More sharing options...
Dirk Korte Posted April 13, 2022 Author Share Posted April 13, 2022 Hi Jose, Thanks for your answer. I have a document property dictating which information link to use. The IronPython Script runs when this document property ("ILGUI") is changed. However, both information links contain lots of data, and I would like to use data on-demand settings to limit this. Hope this helps. I'll look through the documentation you sent me. Cheers, Dirk 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