I’m trying to write a script to get a list of every group in my databases. Here are two methods that almost work but not quite:
set x to every record of every database whose kind is "Group"
– This gets only top-level records (no subfolders)
set x to every parent of every database
– This gets only groups with contents (no empty groups)
Is there an easy way to get both subgroups and empty groups in one list? If not then presumably I have to write a loop to get the first layer of groups, get every sub-group, then repeat with each subsequent layer. (I can see how it’d work but seems very inefficient for something that should be quite simple.)
Thanks.