Skip to main content
August 13, 2021
Solved

Force refresh on chart with record data source

  • August 13, 2021
  • 2 replies
  • 0 views

We have a variety of tools to force data refreshes on interfaces on local variable changes. For example, this is easy to do using a!refreshVariable and I've even found ways to force read-only grids based on record data to refresh using little hacks like this in the filter logic:


a!queryFilter(
field: <field reference here>,
operator: if(local!updateMeToRefresh,"=","="),
value: ri!id
)

However, even this technique doesn't seem to work in charts such as a!barChartField() where a!recordData() is used as the data source. I have an interface where I'm showing some charts based on record data and I'd like the user to be able to refresh that data on demand (there are other components in the interface that are used to update the data behind the chart) without having to reload the page entirely. I want to use record data here, but I may have to change to local variables unless there is a way to make this work.

Looking forward to your ideas!

Best answer by peter.lewis

This feature will be released shortly in the 21.3 release. However, until then it isn't possible using a!recordData() as the source - like you said you would likely need to use a local variable and use the old chart format with categories and series.

2 replies

peter.lewis
Employee
August 16, 2021

This feature will be released shortly in the 21.3 release. However, until then it isn't possible using a!recordData() as the source - like you said you would likely need to use a local variable and use the old chart format with categories and series.

johns222Author
August 16, 2021

Thanks, Peter! I don't mind waiting until 21.3