Jump to content

Replace Information link with on-demand setting using Iron Python script


Dirk Korte

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...