Refresh table when clicking on a chart

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hello!

I'd like to click on a chart and have a table that is using the same model be updated. I tried adding an on-click action to a series on my chart and activating and setting a condition on my model, but it fails to update either the visualization or the table. Any thoughts?

Thanks in advance!
Eulogio
Photo of Eulogio Gallo

Eulogio Gallo

  • 1,874 Points 1k badge 2x thumb
  • curious

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Most likely you are not passing a good value to your condition.  Take a look at this forum post that describes the values available in merge syntax to pass into your condition.  https://community.skuidify.com/skuid/topics/-chart

I often add a "block ui and show message" action in my sequence with the merge syntaxt I am using to pass into a subsequent step in order to ensure I'm actually getting the values I want. 

One complication in what you are looking to do is that once the table is filtered down,  there is not a good way to reset the condition within the chart.  You've drilled in,  but now are stuck in your hole!  Options:
- Make the table open in a popup, and adding actions to a "cancel" button that disactivates the condition and requieries the model.
- Add a global action to the table that refreshes the table.  
- Put the chart / table combination in a wizard with the "back" button in the drilled down wizard step bound to the disactivation / requery combination.  
Photo of Eulogio Gallo

Eulogio Gallo

  • 1,874 Points 1k badge 2x thumb
Thanks Rob, yeah you're right it looks like I was passing invalid values to my condition. The "block ui and show message" advice was very helpful :-)
Photo of Rajendra Rathore

Rajendra Rathore

  • 1,480 Points 1k badge 2x thumb
Hi Eulogio,

Can you please share code of skuid page that will refresh table on click of chat?

Thanks
Photo of Eulogio Gallo

Eulogio Gallo

  • 1,874 Points 1k badge 2x thumb
Sorry, there isn't any code it was all just "point and click". I basically followed the guide here: http://help.skuidify.com/m/models-con...

I then added a "block message and show ui" action to show what input I was passing on to my condition filters. Hope this helps!