Data Driven Category With Detect Hierarchies

Started by Darius1968, January 16, 2024, 10:56:51 PM

Previous topic - Next topic

Darius1968

I'm trying to construct a data driven category on this tag: 
{File.MD.XMP::xmp\ModifyDate\ModifyDate\0|format:YYYYMM}

I want the year to be on one level and the month to be on the next level down.  I tried without success to set : (a colon) as my separator for detect hierarchies.  So, what is the correct way of setting up this data driven category?  Thanks. 

Mario

You are using a format YYYYMM that produces output like 202401.
Your detect hierarchies on : thus cannot work.
Try YYYY:MM as the format (include a colon). This should work.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

This works perfectly if I don't, for instance, have 2013 entered as a filter pattern.  If I do, I only get an all inclusive entry for 2013.  Why is this?  And, is there any way around it? 

Mario

Using variables for data-driven categories should be the exception, not a rule.
Doing this will cause performance problems, unless you set the category to manual updates.

I would recommend to use the tag XMP::xmp\ModifyDate\ModifyDate\0 instead. And enable "Use Part of Value" and set it to 1,7 to get the YYYY:MM part. This is way faster than using a variable which does the same.

When you filter for 2013 you will only get values which contain 2013. What else do you expect?

IMatch sees 2013 on the top-level and creates a category for it.
Your hierarchy split expression using the : produces values like 01, 02, ... which don't contain 2013 and are hence filtered out.
The filter pattern is applied to all levels. There are no per level filter patterns, which is what you would need because of how you structure your category.

Why don't you just use two levels:
1. XMP::xmp\ModifyDate\ModifyDate\0 with "Part of value" set to 1,4 (year)
2. XMP::xmp\ModifyDate\ModifyDate\0 with "Part of value" set to 6,2  (month)

This should produce the hierarchy you want, is fast and allows you to filter for e.g. 2013 on the year level:

Image1.jpg
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

As is, my data driven category is set to manual update.  I would have set it to tag instead of variable, but I didn't because I'm under the impression that if one uses tag, than it's not possible to format the output.  Is this the case? 

Mario

It will work with two variables in the same way as I demonstrated above.
If you need formatting and filtering and hierarchy, use two levels.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook