Search filter that include multiple conditions (like type and task)

Hi, I am new to Shotgun and I am trying the API.

I am trying to make a filter where I can retrieve elements in a specific task, and filter them by state. So for example, all assets that are in "production" task, and ready state.

At the moment I can retrieve the elements that are in a specific task, but I am not sure how do I filter them further, to get only the ones that belong to a specific type.

filtered_by_task = sg.find("Task", filters = [['sg_status_list', 'is', 'rdy']], fields=['production'])

This return me all the elements that are in that task, which are ready, but I don't see how can I filter the result further, to include only "Asset" for example. Adding both statements in the filters will result in an error.

I can filter by asset, but then I can't get all the assets that are in the production task, so I end up with 2 lists and can't associate them to each other.

Suggestions are more than welcome


Please sign in to leave a comment.