Sort keywords

Started by christian.mueller, October 20, 2021, 01:59:33 PM

Previous topic - Next topic

christian.mueller

Hi,
In the File Window I display all the keywords of the file, using the variable {File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~;==, }
as shown in the post Fun With Custom File Window Layouts - photools.com.

My question: how can I sort the keywords alphabetically in that view, similarly as the alphabetical sorting option in the keyword panel?

Mario

You cannot sort the contents of a variable.
Keywords are stored in metadata in the order in which they were added and this is the order in which the variable displays them.
Since many clients, services, agencies and libraries enforce a specific keyword order (more important keywords first), IMatch does not reorder or sort keywords.

Consider using a variable for the @Keywords categories instead. Like this one, which comes straight from the Variables help topic (search for @Keywords on that page):

{File.Categories|filter:@Keywords;replace:~;=={cr}{lf}}
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

christian.mueller

Thank you for the rapid answer :    {File.Categories|filter:@Keywords;replace:~;=={cr}{lf}} solved my formatting problem.