Variable won't return # categories for a file

Started by Darius1968, May 27, 2023, 04:45:55 PM

Previous topic - Next topic

Darius1968

So, I I try {File.Categories|count:true} in VarToy, only to have 1 or 0 returned for a given file - I'm getting confirmation that said file(s) have categories, but not how many.  So, what is wrong here? 

Mario

Works here.

{File.Categories|filter:^Color}
{File.Categories|filter:^Color;count:true}

Returns

Colors|Red;Colors|Green
2

in my test case.

The 2023 release notes have one related entry:

#1863
Variables and Count/Sum/Avg
These functions are now supported for normal variables, not only for repeatable metadata values and category variables.

I currently have no IMatch 2021 version running anywhere so I cannot test if count worked correctly in that version.
Maybe another user can try this?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

#2
I'm able to get this function to work only with the addition of a filter: argument.  Is that also the case on your end? 

This works:
{File.Categories|filter:.;count:true}
This doesn't:
{File.Categories|count:true}


axel.hennig

Works here (see screenshot).

sc1.jpg

thrinn

Works for me also. No need to add a filter.
Thorsten
Win 10 / 64, IMatch 2018, IMA