Page 1 of 1

Is there a way to isolate top-level groups?

Posted: Mon May 20, 2019 8:58 pm
by zzbots
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:

Code: Select all

{
    "ID": 123,
    "Name": "Some Item",
    "ParentGroup": {}
}
And none with a ParentGroup:

Code: Select all

{
    "ID": 456,
    "Name": "Some Item 2",
    "ParentGroup": {
        "ID": 789,
        "Name": "Some Parent Group"
    }
}
I've tried a few things already, including:
  • 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.
Is there a way to do this that I am missing?

Thanks for any help.

[API-601] Re: Is there a way to isolate top-level groups?

Posted: Wed May 22, 2019 12:06 am
by Muqeet
Hi,

Unfortunately there is no way at the moment to search for empty object or isolate them in a list. We have created a task for it, we will let you know with any updates.

Thanks
Muqeet.

Re: Is there a way to isolate top-level groups?

Posted: Wed May 22, 2019 8:23 pm
by zzbots
Ok, and I appreciate the response. I'll check back on this thread periodically.

Thanks!