Hello Tableau Community,
I am trying to download pdf from tableau online. There are two filter ID and Date. When I pass the filter values, I am able to download pdf. The ID filter works fine but the date doesnt seem to change. Currently the date is displayed as 'March 2024'. I have created a filter for monthly.
In script, I tried passing the date values as below:
'2024/03/01', '2024-03-01', 03-01-2024', '03/01/2024', they all failed
I also created make date (Year, month, 1)
the script still doesnt recognize, instead it download the pdf for April 2024 which is set as 'Open Max date when workbook opens'
below is the script:
from urllib.parse import quote
from six.moves.urllib.parse import quote
tableau_sid_field_name = 'SID1'
tableau_sid_field_value = 'S03'
tableau_my_field_name = 'my'
tableau_my_field_value = quote('2024/03/01')
pdf_params = {
"filter_name": f"vf_{tableau_sid_field_name}={tableau_sid_field_value}",
"filter_name": f"vf_{tableau_my_field_name}={tableau_my_field_value}",
}
view_pdf_landscape_layout_march_2024 = conn.query_view_pdf(view_id=pdf_view_id, parameter_dict=pdf_params)
with open('S03.pdf','wb') as file:
file.write(view_pdf_landscape_layout_march_2024.content)
The downloaded pdf is able to pass the filter for ID and downloads for S03 but the issue is with the date
Hi @Nirav Dedhia ,
did you try to pass the date value as '4/21/2024'??
Sunny Kasalawat
Tableau Forum Ambassador 2023