Filter Selections Lost When Published View Automatically Reloads

Published: 16 Apr 2015
Last Modified Date: 11 Aug 2020


When a published view automatically re-loads on Tableau Online, the filter and parameter selections are reset to default.


Tableau Online


This workaround may work, but only if the Tableau Online view is embedded inside another website.
In order to reset the user session and prevent it from expiring, the view can refreshed programmatically with a Tableau Javascript API call
To refresh a view automatically the Tableau Javascript API function refreshDataAsync() can be used. Calling refreshDataAsync() is equivalent to clicking on the Refresh Data toolbar button. 

This call can be embedded into a function, which can be called inside Javascript's setInterval() method to automatically refresh the view every set period. Please see the file attached with sample code where a view from Tableau Public is embedded and programmatically refreshed every 5 seconds. 

Tableau Javascript API reference and samples are available here: API Reference


The ability to retain filter and parameter selections after a published view's page is reloaded is not currently built into Tableau Online. 
Did this article resolve the issue?