Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter to Control Email To Field #218

Open
db-matt opened this issue Aug 13, 2024 · 4 comments
Open

Parameter to Control Email To Field #218

db-matt opened this issue Aug 13, 2024 · 4 comments

Comments

@db-matt
Copy link

db-matt commented Aug 13, 2024

I recently modified a VizAlerts view to use a Tableau parameter to control whether the Email To field would be based on another parameter or from the data source. It is for a VizAlerts that is sent ad hoc so it is not on a schedule and is sent using the "test_alert" feature. If the new parameter is set to "TEST Mode", then a calculated field in Tableau displays the email address(es) from the VizAlerts Email To parameter. If the new parameter is set to "PROD Mode', then a calculated field in Tableau displays the email address(es) from the data source (a live flat file extract). I was NOT able to get this functionality to work corrected. It seemed VizAlerts would only send to the email addresses in the data source, presumably because the new parameter's "Value when workbook opens" is set to the "Current Value", which is "PROD Mode". I'm assuming I'm doing something wrong with my new parameter, but otherwise, I would like to see how else I could accomplish this with VizAlerts. My workaround is to parameterize my data source to switch the email addresses there, but it shouldn't require the entire data set to be re-run in my opinion.

@mcoles
Copy link
Contributor

mcoles commented Aug 13, 2024

There shouldn't be an issue with using a parameter to toggle tests vs prod mode; it's something many of us have done as well. It may be that exporting the CSV from a viz does not count as a "workbook open" event and thus does not set the parameter as you expect. But in the past I've always simply web-edited the workbook and set the parameter the way I wanted, then republished, then used test_alert when I wanted to test something. And that's always worked for me.

@db-matt
Copy link
Author

db-matt commented Aug 13, 2024

Thank you @mcoles for your suggestion. That sounds like a good workaround, too. If I'm understanding correctly, just selecting the parameter from the web without editing or web-editing the workbook might not be enough to tell VizAlerts the correct value for the parameter to test with, but if you edit or web-edit the workbook, change the value, and then re-publish it should work.

@mcoles
Copy link
Contributor

mcoles commented Aug 13, 2024

Yep. If you render the dashboard, then set the parameter, then add "test_alert" as a comment, the version of the workbook being exported by VizAlerts will be different than the one you are looking at, because it's loading the original version that has the original parameter setting. Web editing, changing the param, then saving (publishing) stores that parameter value in the official version of the workbook, so if you do things that way, it's what VizAlerts will see, too.

@mcoles
Copy link
Contributor

mcoles commented Aug 13, 2024

Sorry, had another thought (lots of cobwebs in this part of my brain) - test_alert is a little bit weird because it's outside of the context of a subscription, so you can't, say, create a customized view and have VizAlerts know about that when using test_alert--it's not that smart. But if you subscribe to a customized view, VizAlerts will respect the parameter setting on that view because it has that context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants