Posts about the simPRO API. Help/support/how-to etc.
Forum rules
- Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
- No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
- Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
- Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
- Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
- Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
- Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
- Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
-
zzbots
- Posts: 6
- Joined: Thu Apr 18, 2019 4:41 am
Post
by zzbots » 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:
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.
-
Muqeet
- Posts: 772
- Joined: Mon Dec 03, 2018 3:24 am
Post
by Muqeet » Wed May 22, 2019 12:06 am
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.
Muqeet
API Developer | simPRO Software Group
-
zzbots
- Posts: 6
- Joined: Thu Apr 18, 2019 4:41 am
Post
by zzbots » Wed May 22, 2019 8:23 pm
Ok, and I appreciate the response. I'll check back on this thread periodically.
Thanks!