1
votes

Hello I am creating a spotfire dashboard which I would like to be reusable for each year.

Currently my layout is designed as a page with 8 buttons containing the names of stores, if clicked on, spotfire applies a filter so that only informations relating to that store shows. (these were individually created manually)

Is there a way to automate this with JS or Iron Python, so that for each store a button is automatically created, and in action control for each button is to apply that stores filter?

I have looked around but cannot find anything relating to dynamically creating buttons. Not asking for you to code this for me, but if someone can point me towards some resources or general logic on how this could be done it would be much appreciated.

3

3 Answers

2
votes

instead of buttons, why not a dropdown populated by the unique values in the "store names" column to set a document property, and have your data listing limit the data to [store_name] = ${store_name}

1
votes

Think txemsukr is right. This is not possible. To do it with JS or IP, the API would have to exist. Several of the elements you mentioned (action controls), you can't control with the API.

1
votes

Why not just putting a textarea on your page? Inside this textarea, you add a filter control that filters data the way you want ;)

With this you don't have problem with elements to create dynamically, because it's impossible to create spotfirecontrols dynamically.