Understanding Category-formula refering to a "Direct assignements only" category

Started by axel.hennig, June 26, 2024, 10:34:07 PM

Previous topic - Next topic

axel.hennig

Hi,

maybe someone can explain me the following, because I'm not understanding what's going on:

I've got the following cagegory-tree:

sc1.jpg

The same five images are assigned to category "Alf" under "Persons A" and under "Persons B" AND the same (just one) image is assigned to "Persons A" and to "Persons B". So "Persons A" and "Persons B", both with sub-category "Alf", look exactly the same.

The only difference between "Persons A" and "Persons B" is that for "Persons B" I set "Direct assignments only" to "Yes" (within Properties). That's why after "Persons B" there is "(1)" and after "Persons A" ther is "(1/6)".

The four categories below "test" contain the following formulas:
  • "Persons A 1 - w/o All": "@Category[Persons A]"
  • "Persons A 2 - w/ All":  "@Category[@All|Persons A]"
  • "Persons B 1 - w/o All": "@Category[Persons B]"
  • "Persons B 2 - w/ All":  "@Category[@All|Persons B]"

What I don't understand is the following (see also screenshot above): Why do the first three categories contain 6 images each, whereas the last one just contains 1 image?
  • "Persons A 1 - w/o All" -> 6
  • "Persons A 2 - w/ All"  -> 6
  • "Persons B 1 - w/o All" -> 6
  • "Persons B 2 - w/ All"  -> 1

Out of the online-help for "@Category[]": In its most basic use, this function takes the fully qualified name of a category and returns all files contained in that category and its child categories.

Is this by design (I don't understand why) or a bug?

Mario

Keep in mind that @Category* formulas work with regular expressions.

[@All|Persons B] matches only one category:

@All
|-Persons B

[Persons B] is a regular expression that matches 3 categories

@All
|-Persons B
| test
 |- Person B1
 |- Person B2 

Maybe this is it?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

axel.hennig

Quote from: Mario on June 27, 2024, 09:29:26 AMKeep in mind that @Category* formulas work with regular expressions.
That's it. I had this in mind, but wasn't fully thinking through.