Is there a way to isolate top-level groups?
Posted: Mon May 20, 2019 8:58 pm
I'm trying to find a way to isolate just top level catalog groups that have no "ParentGroup" without having to paginate through the entire list of groups.
I want all items with no ParentGroup:
And none with a ParentGroup:
I've tried a few things already, including:
Thanks for any help.
I want all items with no ParentGroup:
Code: Select all
{
"ID": 123,
"Name": "Some Item",
"ParentGroup": {}
}
Code: Select all
{
"ID": 456,
"Name": "Some Item 2",
"ParentGroup": {
"ID": 789,
"Name": "Some Parent Group"
}
}
- Using the "orderby" parameter - works for root level column names, but doesn't seem to apply to sub columns... i.e. "orderby=Name" or "orderby=ID" work as expected, but "orderby=ParentGroup.ID" does not seem to. If it did (and empty values returned first) I could simply paginate until I started seeing groups with ParentGroup IDs and then stop.
- Using a column name as the parameter in a search - I can't find a way to return items where the value is not present or not a valid type. In other words, if I try "ParentGroup.ID=4" or "ParentGroup.ID=ge(0)" then I get results as I would expect, but what if I only want items with NO ParentGroup ID? "ParentGroup.ID=" fails, "ParentGroup.ID={}" fails, "ParentGroup.ID=in({})" fails, "ParentGroup.ID=lt(0)" fails, "ParentGroup.ID=null" fails, as does every other combination I've tried.
Thanks for any help.