Search on CustomField value "Not Selected"

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.
Post Reply
Test Inc
Posts: 17
Joined: Tue Aug 20, 2019 2:34 pm

Search on CustomField value "Not Selected"

Post by Test Inc » Fri Jan 14, 2022 10:41 am

Is there a way to only get the results from a search where the customfield value is blank or when nothing is selected from a list?

I've tried

Code: Select all

companies/0/jobs/?CustomFields.CustomField.ID=32&CustomFields.Value=
companies/0/jobs/?CustomFields.CustomField.ID=32&CustomFields.Value=0
companies/0/jobs/?CustomFields.CustomField.ID=32&CustomFields.Value=''
companies/0/jobs/?CustomFields.CustomField.ID=32&CustomFields.Value=""
companies/0/jobs/?CustomFields.CustomField.ID=32&CustomFields.Value=null
companies/0/jobs/?CustomFields.CustomField.ID=32&CustomFields.Value=Not+Selected
and all come back empty

Ta,
Ian
robbertcha
Posts: 416
Joined: Thu Apr 15, 2021 10:07 pm

Re: Search on CustomField value "Not Selected"

Post by robbertcha » Sun Jan 16, 2022 10:29 pm

Thanks for your posting, it seems to be an issue within API, We will work on it and try to release a patch in upcoming release. Will let you know when its out.
Robbert
API Developer | simPRO Software Group
casey
Posts: 3
Joined: Thu Nov 16, 2023 12:04 am

Re: Search on CustomField value "Not Selected"

Post by casey » Tue Dec 19, 2023 3:48 am

where does the customField id come from? the custom Feild of interest in this case is called "KPIN"

i can get some info containing the customField id using the following but cannot seem to use ?CustomFields.CustomField.ID=KPIN
https://<company>.simprosuite.com/api/v1.0/companies/",0,"/sites/",<id>,"/?columns=CustomFields
casey
Posts: 3
Joined: Thu Nov 16, 2023 12:04 am

Re: Search on CustomField value "Not Selected"

Post by casey » Tue Dec 19, 2023 3:51 am

Will this allow me to get the site information using the value in KPIN e.g. 7702?
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Search on CustomField value "Not Selected"

Post by Sindre » Tue Dec 19, 2023 4:42 am

Hi Casey,
You can find the custom field ID's in the setup section of the API.

See here for different kind of custom fields and their setup. For example, if you have custom field #4 set up for jobs all jobs will have custom field 4, but with different values stored. You can then query the value in the custom field ID.

https://developer.simprogroup.com/apido ... 385e9fb6f0

Regards
Sindre
API Developer | Simpro Software Group
Post Reply