Add a "parent of it" inspector

It would make writing complex relevance statements much easier if there were a “parent of it” inspector.

Example: This would refer to files which had creation times equal to the maximum:

parents of parents of maxima of creation times of files whose(name of it as lowercase ends with ".log") of folders "C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\__Global\Logs"

Even if it the “parents of it” would return the whole collection, it would still make this sort of filtering ‘easier’:

item 3 of (it, parents of it, parents of parents of it) whose(item 0 of it = item 1 of it) of maxima of creation times of files whose(name of it as lowercase ends with ".log") of folders "C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\__Global\Logs"

This would enable the following:

lines of parents of parents of maxima of creation times of files whose(name of it as lowercase ends with ".log") of folders "C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\__Global\Logs"
1 Like

Would this be just applicable to folders/files?

Preferably all object types.

Some types don’t have a logical parent.

We do have some that do have “parent” types though like

parent key of <registry key>
parent folder of <filesystem object>

The issue with using parent of <object> is also that that does exist and returns the parent type

Parent might be the wrong word for it… I really mean the object that the current object was derived from, regardless of what it was. It is not a question of the parent/sibling nature of the item on its own, just in terms of order of relevance operations and going up a level.

If I understand you would want in the following:

users of active directory users

if you asked for “parent” or “creator” or whatever in this case you would get an active directory user type?
That might be rather complex as we don’t keep this type of construction information and all the types could get large.

1 Like

if I understand correctly, we aren’t asking for a class of objects, but a grammar for changing the reference of “it”.

(((property x of it) of object1 of it) of object2 of it) of object3

Here “property x of it” can refer only to object1; it would be handy to be able to refer to object2 or object3. It’s a method of “unwinding the patentheses”

In the innermost parentheses, “it” would refer to object1; while parent of it would refer to object2, regardless of type; and parent of parent of it would refer to object3.

jgstew am I understanding it correctly? I may have put in an rfe a couple years ago to add new variables “this” and “that”, in addition to “it”, to accomplish the same.

1 Like

Yes @JasonWalker that is exactly what I mean.

So essentially a ancestor of it type of class. So for this simplistic example

((name of it) of file "foo" of it ) of folder "bar"

You might like to do something like

((name of it, ancestor of it as string ) of file "foo" of it ) of folder "bar"

where ancestor of it is the new type and you would get:

 foo, bar

where the first it refers to the file and the second refers to the folder

Is that correct?

1 Like

Yes, that is the idea.

ancestor seems like a good name for it.

I know this post is 5 years old, but has anything ever been done regarding this? Is there another way to write relevance to achieve similar functionality?

In the five years since, I think we’ve just gotten a little better at working within the constraints and using tuples.

From one of the examples

((name of it) of file "foo" of it ) of folder "bar"

Today we’d write it as something like

(Name of item 0 of it, name of item 1 of it) of (file "foo" of it, it ) of folder "bar"

That can get especially complicated with some classes like registry keys though, where “of” is usually part of the creation statement.

2 Likes