Filter Query - limit to one Result
1 1

6 posts in this topic

Hi, we are currently trying to set up a filter query in the browser. Goal is to list all latest version of assets for one project which have the status "approved" or "Artist Reviewed". 
We have come up with the following query:
 

 "(status.name is 'Artist Reviewed' or status.name is 'Approved' ) and (task.type.name is 'Compositing' and asset.name not_like '%preRender%')" 

The thing is that we only want to see one result, the lastest, and not all versions matching the criteria. 
I have read in the forum that "limit and order by" statements are not possible in the filter query. 

Do you have a hint for us to get the result we want?

thanks!

Share this post


Link to post
Share on other sites

Hi Julian, 

thank you for your answer, but the built-in latest version filter sadly doesn't work here. It only gets all latest versions like a preselection and other Filters are applied after the "the built-in latest version filter". If I have an Asset Version 7 which has the status "pending review" and an Asset Version 6 with status "Approved" i want to get the Version 6 as result.  What I get for this asset when activating the "built-in latest version filter" and filtering for "Approved" and "Artist Reviewed" is an  empty result. Thats because Version 7 which is the latest  existing version doest not match the filter criteria. Version 6 is not included in the Query. Is there anyone who can help me with this?
Thanks!

Share this post


Link to post
Share on other sites

Ah ok .. guess that’s by design.

you could setup an event handler that is listening to status changes and sets a ‘latest_approved’ flag on the most recent approved version. Then you could use that attribute in your queries.

Quite involved for what you want but it should work. Would be welcome if something like that could be accomplished with the filter queries instead.

 

Share this post


Link to post
Share on other sites

Hey Julian,

thank for your reply. Thats a good idea. We will try that. Like you said, it would be very very welcome to do this kind of sorting stuff with filter queries instead.

Thanks again.

Sascha

Share this post


Link to post
Share on other sites

Hi,

The filter that you need requires multiple queries.
And the web gui can't handle that, at the moment.
This is something that we are aware of and that's being discussed.
Can't giva any guarantees, but hopefully we could get even better possibilities for queries in future release(s)of ftrack.
In the meantime, as mentioned by Julian, you could use the API.

Regards,
Johan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1