-
Notifications
You must be signed in to change notification settings - Fork 425
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
the function vf() (view filter) does not handle with special character as "&" #578
Comments
Hey Chady, I encountered a similar issue very recently. You can work around this successfully, and it is worth noting that even if TSC scrubbed the '&' value from your filter value, your dashboard would not display the correct data due to the values no longer matching -- so you must fix this on your end. First, this is not an error of the TSC library -- the '&' character is used to append additional URL params to your URL string, so when the URL string encounters the '&' in your client's name it assumes the text that follows is an entirely new URL parameter. Even though this cannot be fixed from TSC's side, here is how you can resolve the issue:
Hope that helps, |
Hi Elliott,
Thank you for your quick response. It's very clear.
Finally I found a solution thanks to URL-encoding Reference using
*string.replace("&","%26)*
Have a good day.
Chady
Le dim. 8 mars 2020 à 01:11, Elliott <[email protected]> a écrit :
… Hey Chady,
I encountered a similar issue very recently. You can work around this
successfully, and it is worth noting that even if TSC scrubbed the '&'
value from your filter value, your dashboard would not display the correct
data due to the values no longer matching -- so you must fix this on your
end.
First, this is not an error of the TSC library -- the '&' character is
used to append additional URL params to your URL string, so when the URL
string encounters the '&' in your client's name it assumes the text that
follows is an entirely new URL parameter.
Even though this cannot be fixed from TSC's side, here is how you can
resolve the issue:
1. build a new version of your field in Tableau which removes the '&'
character from the field
2. be sure to use this new field as a filter in your dashboard / view
that is published
3. reference the new field as your vf_ filter value
Hope that helps,
Elliott
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#578?email_source=notifications&email_token=AL3CJQPDJPTGCUHTPCXQ25LRGLPBNA5CNFSM4LBPWQJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOEIUTQ#issuecomment-596150862>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL3CJQNKNSSJY4QNZBKJD43RGLPBNANCNFSM4LBPWQJA>
.
|
Hey Chady, that's better than my fix! I'm going to use your approach. |
Hey all, My filters are not working with .vf() i am getting pdf with the filters which is published . can you suggest me how to resolve this issue. |
Is there any way of passing multiple parameters to a single view |
Hi @TimMoyce, If you want to add multiple values such as in a drop-down selection box, you can do something like If you want to add multiple filters, then you can create a dictionary of your filters and then loop through them like so:
Please note that you will likely have to do some formatting of your dictionary data before. |
I am using the TSC API on python to generate multiple pdf files (one for each client).
When using pdf_req_option.vf(parameter,value)
Where parameter = 'client' and value = the name of each client
All the pdf are generated correctly except for one client that have a '&' in his name.
For this client the PDF is generated but without any data inside.
It is the same result than if I gave a fake value that dosen't exist in my list of 'client' parameter.
The text was updated successfully, but these errors were encountered: