How always to render a new image from data column at reload

How always to render a new image from data column at reload

book

Article ID: KB0076140

calendar_today

Updated On:

Products Versions
Spotfire Server All

Description

The "Render: Image from URL" functionality uses the same process with cache in Spotfire Clients both in Analyst and Web Player. The images are cached in an application service, which only expires when the application session is closed. Re-opening the analysis would still use the old image which is cached in an application service. This means that if the source image is updated the rendering of the image in the application will not change unless Spotfire Analyst/Web Player is restarted.

However, there might be a use case when the source image is being updated and there is need to get a new image regularly. Just using the scheduled updates will not be enough, until it is expired the same cached image will be displayed at every load.

Issue/Introduction

This article describes how to render always a new image from data column at reload

Resolution

Restarting the Web Player to get new version of the image is not a suitable workaround.

However, there is a way to "trick" Spotfire into loading new image - to achieve that, some unique part can be added at the end of the URL which has to be different at every load.
With a different unique ending at the end of the URL at every load a new image would be rendered. In the analysis file add a calculated column (Data>Add calculated column>), choose "Concatenate" from the functions and as arguments provide (separate arguments with coma):
  • ColumnName - name of the column where the URL to the image is stored
  • '?' 
  • DateTimeNow() - this returns the current system time, which would be different at every new load making the URL unique and rendering the new image instead of using a cached one.
  •  
The resulting expression will look like this:  Concatenate([ColumnName],'?',DateTimeNow()). Afterwards from Properties>Columns choose the created column to be displayed and render Image from URL. See the GIF for reference: 

User-added image

Additional Information

Doc: TIBCO Spotfire Analyst User's Guide - 10.6 - Details on Image from URL Renderer Settings Doc: TIBCO Spotfire Analyst User's Guide - 10.6 - Details on Add Calculated Column Doc: TIBCO Spotfire Analyst User's Guide - 10.6 - Date and Time Functions Doc: TIBCO Spotfire Analyst User's Guide - 10.6 - Text Functions - Concatenate