Jump to content

How to render/provide binary attachments other than images


Maik Zielinsky

Recommended Posts

  • 5 months later...

Hi Maik

It sounds like reading the attachments all at once as part of the data table refresh would possibly take up a lot of memory especially if the user only selects one or two items to read. What I would suggest is having the user mark the rows they want to download, then have a button they press that runs an IronPython script. This script can read from a separate information link passing only the keys to identify the rows to download and retrieving only the binary content which can then be written to the hard drive of the users machine. This would only work in Spotfire Analyst.

Here is an article on using Information Links to retrieve data with prompting (parameter(s)):

https://community.spotfire.com/s/article/How-to-add-Data-Table-based-on-a-Parameterized-Information-Link-in-TIBCO-Spotfire-Using-IronPython-Scripting

Also here is an article on reading column data from a data table:

https://community.spotfire.com/s/article/How-to-read-Column-Values-in-TIBCO-Spotfire-Using-IronPython-Scripting

In this example, all rows are read, but marked rows can be read by getting creating an IndexSet as follows:

selection = document.Data.Markings[mymarking].GetSelection ( mydatatable ).AsIndexSet ();

Hopefully this points you in the right direction.

Cheers

Dave

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...