Is it possible to automatically detect documents/files that are not part of the highest grouplevel?

I’ve got several databases that are highly structured, in such a way that all documents/files are part of some created group.

To give a simple visual example:

Inbox

  • group A
    — group A1
    —- group A11
    —- group A12
    — group A2
  • group B
    — group B1

To be clear, the real structure is far more complex.

The idea is a file resides in the highest grouplevel that is possible. So a file that is grouped under A1, cannot reside in A1 but should be part of A11 or A12 because group A1 contains groups. If required a new group called A13 can be created. A file that is part of B1 can stay there as that is the highest grouplevel for B.

Obviously files in the inbox are a trigger to classsify, but once in a while I also run into documents/files that have been classified in a group that is not of the highest level (as would be the case for group A1 in the example above).

I would like to clean those files up proactively and was thinking whether it possible to automatically detect documents/files that are not part of the highest grouplevel. Preferably with a smart group. Does anybody know if that’s possible?

A simple but manual first-pass would be to create a custom metadata field which is a binary field called something like highest_group. Then manually check that box for all of your highest level groups. Then it is simple to create a Smart Group of items in any group that is not checked as a highest_group.

A more elegant but harder solution would be to then write a script which traverses your database and automatically sets the checkboxes on all highest-level groups and unchecks the checkboxes on all others.

Thanks for your reply! That could work, and will save time, but that still requires manually marking each highest group and editing that with every mutation to the group structure (didn’t mention the frequency of that, so you couldn’t know). Thinking about it, your suggestion might in fact work more efficiently the other way around in my situation (metadata ‘not-highest’) as those groups should only contain groups and files marked ‘not-highest’ can then be filtered out.

That could be done more easily though if I could create a smart rule that looks for groups (kind=groups) containing other groups, but AFAIK that’s not possible.

Edit: I erronously assumed the meta-data of a group would propagate to files within that grpup, but it doesn’t. Back to the drawing board or use the method above I guess.

Metadata doesn’t propagate but tags can.

In File > Database Properties, enable Inherit Tags of Groups. Tag some group and the children *(and grandchildren, etc.) * of the group will all get that tag.

1 Like

Thanks! That sounds like a method that could work.

But no way to search for groups that only contain groups I think? Or actually the inverse: groups that contain groups and files (as that combination shouldn’t exist in my DB, except for the Inbox perhaps)

Not without scripting of some kind. Otherwise it would require a Location criterion, but that is not one that exists.