Advanced find

Started by rienvanham, August 24, 2022, 06:49:04 PM

Previous topic - Next topic

rienvanham

I tried to find it but did not succeed....

My keywording is a little bit "overdone" by the way that I store all locationdata also in the keywords; e.g. a lot of files have the country "Deutschland" in the keywords. I would like to find out if I missed any files.

So, I would like to find the files where (e.g.) country (the value of {File.MD.Composite\MWG-Country\Country\0}) is NOT present in the keywords.

Thanks in advance,

Rien.

Mario

#1
That's actually not easy to do.

To phrase this: "Find all files where the tag T contains the value V but the tag T2 does not contain V."

On a small scale, you can use two Value filters in the Filter Panel. One for City, one for Hierarchical Keywords. Click the same value in both filters and you see only the files which match this criteria. Invert the Filter Panel to see all files which don't match.

But on a database scope, this becomes more challenging....
For all files in the database, check if the value contained in the tag "City" does not appear in the values of the repeatable tag "hierarchical keywords".
The search bar etc. use a fixed search term, they don't vary it per file.

But we have IMatch, so there is usually a way.
One trick I've often used was to create a variable which returns YES/NO, depending on whether the condition I'm interested in is met or not.
In your case, this variable would suffice:

{File.MD.hierarchicalkeywords|contains:{File.MD.city},YES,NO,true}

It returns YES when the city value is also contained in the hierarchical keywords, else NO.
Use this to setup a data-driven category and you see all files with mis-matches in the NO category.

Note: Case-sensitive must be true, else the variable {File.MD.City} will be converted to {FILE.MD.CITY} and this is not a valid variable name. A glitch, I believe.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

rienvanham

#2
Hi MArio,

Thanks for this (superfast given) explanation! Ik will give it a try.

Your service is fantastic!

Cheers,
Rien.

P.S.:
Off course it works! Thanks again!