Mysterious variables

Started by DigPeter, February 04, 2014, 08:54:43 PM

Previous topic - Next topic

DigPeter

Image has the following hierarchical categories:

@Keywords
  Source|Peter Photo;
  Subject|Natural History|Wild Plants;
  Taxa|Flowering Plants|Lamiaceae|Lamium album;
  Where|UK|Hants|Around Andover

In version 138:

In VarToy app, using examples from 'Variable' Help topic:
*{File.Categories.Direct|level:0}             > *  ('*' deliberate to point up null result)
*{File.Categories.Direct|level:-1}            > *

For this image, the above variables do not work as advertised in Help.  In fact I am unsure what result to expect here.

These variables give the results shown
{File.Categories|filter:Taxa;level:leaf}         > Lamium album
{File.Categories|filter:Taxa;level:3}                > Lamiaceae
{File.Categories|filter:Taxa;level:2}                > Flowering Plants
{File.Categories|filter:Taxa;level:1}                > Taxa
{File.Categories|filter:Taxa;level:0}
            > @Keywords

For this set of variables, the results are as expected, but contrary to Help statement: |level:, |leaf: or |root cannot be used together with filter: Use the leaf,level,root parameters for the filter function instead.

BUT, the negative index again does not work. 
*{File.Categories|filter:Taxa;level:-1               > *
This should give the same result as Level:3

Mario

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

DigPeter


See the second example in my OP.

Also:
*{File.Categories|Taxa;level:-1}  >*Peter Photo;Natural History;Flowering Plants;UK;ISO;Make and Model

:o :o :o

DigPeter

@ Mario
Is this a bug?  Should I open a bug report?  I will be off line for 10 days.