Boolean query

Forum for users and developers of Bullhorn's new REST API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

DaveNorthCreek
User
Posts: 71
Joined: Fri Nov 20, 2015 2:04 pm

Boolean query

Postby DaveNorthCreek » Fri May 12, 2017 2:11 pm

Hello Bullhorn!

I'm using my php command line client to do an update of a boolean field of Candidates. The problem is that the query I'm using to return the next 50 candidates to update is not working. I'm looking for Candidates with a value of "false" for smsOptIn. My client wants all Candidates to have that value be "true".

Here's the query:

Code: Select all

https://rest32.bullhornstaffing.com/rest-services/XXXXX/search/Candidate?BhRestToken=[redacted]&query=smsOptIn:false&fields=id,smsOptIn&start=0&count=50


If I change the query to query=smsOptIn:true I get a different set of Candidates back, but all of them now have the smsOptIn value of "true" whether I'm looking for false or true.

I looked up the first returned Candidate ID via the Bullhorn Web interface (using my API username) and was unable to see the detailed record (due to permissions). However, through the API I can get the complete Candidate record. There may be a permissions issue, or there may be something going on with querying for boolean values. Should I be using 1/0 instead of true/false? I get the same responses as true/false when I use 1/0, so there seems to be something else going on.

Thanks for any tips!

Dave Block
North Creek

scaffrey
User
Posts: 2
Joined: Fri Feb 03, 2017 9:02 am

Re: Boolean query

Postby scaffrey » Wed May 17, 2017 6:00 am

Hi Dave,

The query you are using is correct however there was an issue with your database where this field was not displaying the correct data.

I have run some maintenance on your database and the search now works correctly.

If you have any questions please let me know.

Thank you,

Sam
Bullhorn Support UK: 44 800 032 2848
Bullhorn Support US: 1 617-478-9126
Bullhorn Support Australia: 61 28 073 5089
Bullhorn Support International: 1 617-478-9131

DaveNorthCreek
User
Posts: 71
Joined: Fri Nov 20, 2015 2:04 pm

Re: Boolean query

Postby DaveNorthCreek » Wed May 17, 2017 1:33 pm

Thanks Sam, all is working as expected now.

Is there anything I can do to avoid this problem in the future?


Return to “REST API”

Who is online

Users browsing this forum: No registered users and 2 guests