Unable to filter out records with blank/empty field using POST /query REST endpoint

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
groganzola
User
Posts: 2
Joined: Mon Apr 13, 2020 11:35 am

Unable to filter out records with blank/empty field using POST /query REST endpoint

Post by groganzola »

Hello -

When using the POST /query REST endpoint, I am trying to retrieve all CorporateUser records where email is not empty/blank/null. But, still records with an empty email field are returned. I have attempted using "IS NOT EMPTY" and "IS NOT NULL" predicates. Both are accepted, but (oddly) neither prevents the return of records that have empty email fields.

Perhaps I should use the POST /search REST endpoint and use a lucene query instead? But is it really not possible using the POST / query endpoint?

Thank you

======================================================================

Method
---------
POST

Endpoint
-----------

https://rest91.bullhornstaffing.com/res ... Name,email

Request Payload
--------------------

{
"where" : "((email IS NOT EMPTY) and (email is NOT NULL) and (email <> '@'))"
}

Response Payload
--------------------

{
"start": 0,
"count": 500,
"data": [
{
"id": 333448,
"firstName": "The Real",
"lastName": "Groganzola",
"email": ""
}, ...
<snip>
}

bbagwell
User
Posts: 16
Joined: Wed Feb 26, 2020 12:17 pm

Re: Unable to filter out records with blank/empty field using POST /query REST endpoint

Post by bbagwell »

Hi groganzola,

Have you tried just using one of these by itself or using the OR operator and would state both have to be met which is not possible?

Post Reply