Skip to content

View Filters on parameters #1632

@dawilson23

Description

@dawilson23

Describe the bug
Filtering on workbook parameters doesn't work. Current workaround is to use the .vf() method and prepend the filter name with "Parameters."

To Reproduce
with server.auth.sign_in(tableau_auth):
logger.info(f"Signed in to Tableau Server: {SERVER_URL}")
view_item = server.views.get_by_id(VIEW_ID)
logger.info(f"Fetched view: {view_item.name} (ID: {view_item.id})")

    # Set up image request options
    image_req = TSC.ImageRequestOptions()
    image_req.vf('Parameters.field_name', 'value')

    # Download the image
    server.views.populate_image(view_item, image_req)
    image_data = view_item.image

Results
No error is received

Source code ->
def append_view_filters(self, params) -> None:
for name, value in self.view_filters:
params["vf
" + name] = value
for name, value in self.view_parameters:
params[name] = value

Might need to be ->
def append_view_filters(self, params) -> None:
for name, value in self.view_filters:
params["vf
" + name] = value
for name, value in self.view_parameters:
params["vf_Parameters." + name] = value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions