I’m looking to query for nodes that are not in any group, but am having trouble figuring out the correct way to query for that. In my query so far, I find SinglefileData nodes that are from CalcJobNode, where the CalcJobNodes are in a given group. However, I want to limit it to only find SinglefileData nodes that are not in any group. Here’s the query I have so far:
Unfortunately there is no syntax to express “not in Group” in the querybuilder. A typical workaround is to first get the ids that are in the target group, and then perform a second query that excludes those ids:
Note that this will get all SinglfileData nodes that are created by a CalcJobNode that is not in the group gaussian_sp. It will include nodes that may be part of another group. It was not clear from your question if those should also be excluded, in which case you would have to repeat the first query for each group to be excluded.
Thanks for the workaround! It works. For my purposes, the orphan files that are the output of the CalcJobNode should only ever be in one group, so querying for one group works.
However, I adjusted the query for all groups for future proofing