photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: DigPeter on January 30, 2014, 12:25:36 PM

Title: Expressions query?
Post by: DigPeter on January 30, 2014, 12:25:36 PM
I am using expressions such as: {File.Categories|filter:Subject;level:3}, for instance in the category A|B|C|D this would give C

Is it possible to designate an element counting from the bottom by using a negative number;  that is {File.Categories|filter:Subject;level:-2}, again to give C?  Or is there another method?

I thought that I had read this somewhere in the Help topics, but cannot find it.  It would be useful, where the number of elements vary under a top node.

@Mario:  If it is possible to arrange this, I will raise a feature request.
Title: Re: Expressions query?
Post by: Mario on January 30, 2014, 06:34:18 PM
You can access the leaf, the root and all levels in-between using an index. There is no other way, and no negative index.
Title: Re: Expressions query?
Post by: DigPeter on January 30, 2014, 06:39:04 PM
Quote from: Mario on January 30, 2014, 06:34:18 PM
You can access the lead, the root and all levels in-between using an index. There is no other way, and no negative index.
Thanks, Mario.  Would it be possible to provide this?
Title: Re: Expressions query?
Post by: Mario on January 30, 2014, 07:03:24 PM
Sure, someday. Add a feature request for it. I'm doing small changes all the time.
Title: Re: Expressions query?
Post by: DigPeter on January 30, 2014, 07:23:20 PM
Thanks - done.
Title: Re: Expressions query?
Post by: DigPeter on February 01, 2014, 06:00:05 PM
@Mario
Thanks for fixing that.  I hope that other people might find it useful too. :D

OT I would be grateful if you take a quick look at https://www.photools.com/community/index.php?topic=1666.msg10597#msg10597 .  Do you think you might be able to solve this problem in due course?
Title: Re: Expressions query?
Post by: Mario on February 01, 2014, 06:10:16 PM
I keep an eye on all bugs. Currently I'm working in another area.
Title: Re: Expressions query?
Post by: DigPeter on February 01, 2014, 06:15:41 PM
OK, thanks - as I said, in due course  :)