Jump to content

Iron Python to refresh Information Link with Prompt


Jon Orth 2
Go to solution Solved by David Boot-Olazabal,

Recommended Posts

I have an information link that uses a prompt to select a smaller set of data and am trying to get it to refresh and bring up the prompt to make the selection using Iron Python.  Refreshing all data or refreshing the individual table never brings up the prompt from the information link.  Is there another method that I need to use for this?

Link to comment
Share on other sites

Hi Jon,

The easiest way to do this, is to activate the checkbox "Prompt for new settings before loading" within  the data table properties window:
image.thumb.png.2bfb84c4bd9972febfc8daf4e9b05091.png

This way, whenever a user reloads the data via the menu Data>>Reload all data, the prompt is popping up to change the initial selection.

 

Kind regards,

David

Link to comment
Share on other sites

To clarify, this option is already checked on the data table.  I would like to have a script linked button to refresh that table and let the user make another selection but the window won't appear and it just reloads regardless of whether that is checked or not.

Link to comment
Share on other sites

  • Solution

Hi Jon,

Sorry for the confusion. I have found a working solution, using iron python.

This is also referred in other article: 

https://community.spotfire.com/forums/topic/3108-button-to-reload-prompt-on-spotfire/

 

Here is the code I used in my dashboard:

from Spotfire.Dxp.Framework.ApplicationModel import *

def Refresh():
# define script parameter "table" to be refreshed
    table.Refresh()

ps = Application.GetService[ProgressService]()
ps.ExecuteWithProgress("refresh title", "refresh description", Refresh)

When you create this iron python code, and put it behind a button in a text area, be sure to uncheck the "Execute in transaction" as well as add a parameter for the data table that needs to be refreshed:
image.thumb.png.4875a4f607668ac93790f2106b310fad.png

This worked for me in Spotfire 11 as well as Spotfire 14.

Kind regards,

David

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