This article provides a sample IronPython script reference on how to add a data table based on an information link with prompts
Introduction
This article provides a sample IronPython script reference on how to add a data table based on an information link with prompts
Code Sample
# Copyright © 2019. TIBCO Software Inc. Licensed under TIBCO BSD-style license. 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 (Right-click, Copy ID from the information designer) ilGuid = "7f81a04c-248f-4380-940c-5006b4aec595" ilDataSource=InformationLinkDataSource(Guid(ilGuid)) # Get the InformationLink Descriptor and list of filter Parameters descriptor=ilDataSource.GetInformationLinkDescriptor((Guid(ilGuid))) filterParameters=descriptor.FilterParameters #define values that are generally selected in the prompts values = [0,127] values=Array[object](values) #list to save information link parameters ilParameters = [] #create parameter ilParameter1 = InformationLinkParameter.CreateFilterParameter(filterParameters[0].ElementIdentifier,"%Column% in (%Values%)", values) ilParameters.append(ilParameter1) #Assign the parameters ilDataSource.Parameters = ilParameters Document.Data.Tables.Add("IL_WithPrompts",ilDataSource)
References
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.