tableau / extensions-api

Extensions API sample code and developer docs.
http://tableau.github.io/extensions-api
MIT License
268 stars 251 forks source link

UINamespace Sample Extension #176

Closed Sanjay-Chandrashekar closed 5 years ago

Sanjay-Chandrashekar commented 5 years ago

I am making use of UI Namespace extension on tableau desktop to select the data sources and time interval to refresh. The extension is working fine in tableau desktop.

But when I configure the extension and publish the workbook to tableau server, I am not able to see the changes made in the workbook. It is going back to the initial state : "Configure extension to proceed"

The changes are not being saved when the workbook is published to tableau server.

Could you please let me know if I am missing something?

Sanjay-Chandrashekar commented 5 years ago

I was able to fix the issue by going through the Samples Settings Extension and making code changes in UI Namespace example.

In the UI Namespace extension, we need to include a function to check previous saved settings and populate UI based on that.

We can see the settings saved by opening the .twb file. Previously only selected data sources was saved as the settings. But have included the code to save the selected interval as the setting in addition to data sources. This will be useful to retain the state of the interval when the user clicks on configure next time.

The full code changes for the same is available in LocalRepository.

With this changes once we configure the extension in Tableau Desktop and publish it to Tableau Server, the changes will be reflected in Tableau Server.