Filtering versions but exclude the latest version?

I’m trying to set up a page to filter Published Files (and their linked versions).
Is there anyway to filter out/exclude the latest version for a shot or asset?

Use case:
Deleting/archiving and keeping the latest version / several previous versions.

2 Likes

Hi @Ricardo_Musch

Hope you are doing well :slight_smile: Thanks for the question.

Sadly, the latest filter is not an available token to be used within a filter :frowning: You’ll notice the latest checkbox on a version page, but that is hard-coded into version pages and can’t be used elsewhere.

Having said that, theres a little trickery that might help here.

  1. Do to a version page and check the latest checkbox to show all the versions you want to keep
  2. Then, tag all those versions with a specific tag
  3. Finally, create a new filter that shows all versions excluding the tag you just created.

Hopefully that should give you a concise list of versions that you can safely delete.

If you have any further questions don’t hesitate to give us a shout.

Cheers,
Andrew

3 Likes

Thanks Andrew!
Not bad here, hope you are great!

Would definitely be great if “latest” could be included across the board.

Luckily I’m building an app that would send deletion stuff to the farm so I’ll add some logic to keep the version if it’s the only version for that entity.

Thanks :slight_smile:

1 Like

Hi Ricardo,

I’m unclear if your end goal is the page filter itself or if that was just being used to prototype a filter for

If the goal is actually building an API-based app, you might want to look into Additional Filter Presets. The LATEST additional filter preset for the Version entity might be what you’re looking for.

2 Likes

Although, rereading your use case, my suggestion would return the latest, not exclude it. So, although it might still be useful, for exclusion you’d have to do two queries and “subtract” the latest from the full query… so your mileage may vary with the additional filter presets.

2 Likes

Initially it would have been nice to do this on my custom page but your suggestion has just saved me a bunch of lines of code :wink:

Thanks!

2 Likes