You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
the function vf() (view filter) does not handle with special character as "&" #578
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.
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:
build a new version of your field in Tableau which removes the '&' character from the field
be sure to use this new field as a filter in your dashboard / view that is published
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 <notifications@github.com> 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>
.
Is there any way of passing multiple parameters to a single view
I currently have
pdf_req_option.vf(filter_criteria1, Parameter_StoreBrand)
but cannot find a solution to add a second criteria. I am aware how to do this using URL parameters but not the TSC module
Thanks
Is there any way of passing multiple parameters to a single view
I currently have
pdf_req_option.vf(filter_criteria1, Parameter_StoreBrand)
but cannot find a solution to add a second criteria. I am aware how to do this using URL parameters but not the TSC module
Thanks
If you want to add multiple values such as in a drop-down selection box, you can do something like pdf_req_options.vf('filter_name', 'value1,value2,value3')
If you want to add multiple filters, then you can create a dictionary of your filters and then loop through them like so:
for k, v in filters.items():
pdf_req_options.vf(k, v)
server.views.populate(view, pdf_req_option)
Please note that you will likely have to do some formatting of your dictionary data before.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
Sweep note: this is resolved on current TSC. Filter values passed to vf() (request_options.py:352) end up in the params= dict handed to requests in Endpoint.get_request (endpoint.py:200-215), which URL-encodes them - so & is sent as %26 without the caller having to escape it. The unencoded legacy path (apply_query_params) only fires against API < 3.7 (Tableau 2020.1), which is well out of support. Closing.
Activity
divinorum-webb commentedon Mar 8, 2020
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,
Elliott
ChadyNassar commentedon Mar 9, 2020
divinorum-webb commentedon Mar 9, 2020
Hey Chady, that's better than my fix! I'm going to use your approach.
vignesh1609 commentedon Jul 8, 2020
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.
TimMoyce commentedon Nov 29, 2020
Is there any way of passing multiple parameters to a single view
I currently have
pdf_req_option.vf(filter_criteria1, Parameter_StoreBrand)
but cannot find a solution to add a second criteria. I am aware how to do this using URL parameters but not the TSC module
Thanks
seve-martinez commentedon Mar 31, 2021
Hi @TimMoyce,
If you want to add multiple values such as in a drop-down selection box, you can do something like
pdf_req_options.vf('filter_name', 'value1,value2,value3')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.
github-actions commentedon Aug 18, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
jacalata commentedon Aug 25, 2026
Sweep note: this is resolved on current TSC. Filter values passed to
vf()(request_options.py:352) end up in theparams=dict handed torequestsinEndpoint.get_request(endpoint.py:200-215), which URL-encodes them - so&is sent as%26without the caller having to escape it. The unencoded legacy path (apply_query_params) only fires against API < 3.7 (Tableau 2020.1), which is well out of support. Closing.