
Hi All,
We have a dashboard in which users can create a set (using a set action). This dashboard is embedded in a portal and we would like to restore this dashboard for the users upon their next login, including setting the filters and this set, using the Javascript API. So far this all worked well with the filters, but we encountered an issue with restoring the set.
We have not been able to find a way to set the values of a set, using the Javascript API (Version tableau-2.5.1.min.js and tableau server version 2020.2.3)
Below is a code snippet for your reference
//works
worksheet.applyFilterAsync("Selected Wells Set",['2508322191'],'replace').then(function() {
console.log(‘works!);
}, function(err) {
console.log(err);
});
// get an error invalidFilterFieldValue
worksheet.applyFilterAsync("Selected Wells Set",['2508322191’],’add’).then(function() {
console.log(‘does not work!);
}, function(err) {
console.log(err);
});
Thanks.
Assuming this is another duplicate question but also wanted to note that you cannot update sets with the API only filters.