Querying nested fields

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
gkisssec
User
Posts: 4
Joined: Thu Aug 29, 2019 11:30 am

Querying nested fields

Post by gkisssec » Fri Nov 08, 2019 10:26 am

I'm trying to make a query that fetches the IDs of candidates with no fileAttachments.

I would have thought something like this would work

Code: Select all

/search/Candidate?fields=id,fileAttachments&query=isDeleted:false AND fileAttachments.total:0
Could someone point me in the right direction? :)

zgonza
User
Posts: 3
Joined: Fri Aug 30, 2019 9:38 am

Re: Querying nested fields

Post by zgonza » Fri Nov 08, 2019 3:37 pm

Hello,

I was able to pull together a string that may work. I have included it below. Take a peek and let me know if you are having troubles moving forward.

/search/Candidate?fields=*&query=fileAttachments.id[1 TO 99999999999] AND isDeleted:false

Cheers,

gkisssec
User
Posts: 4
Joined: Thu Aug 29, 2019 11:30 am

Re: Querying nested fields

Post by gkisssec » Mon Nov 11, 2019 8:34 am

Small update on this.

I can query for city, for example

Code: Select all

/search/Candidate?fields=id,address&query=isDeleted:false AND address.city:"London"
This works fine. However if I tried to do the same to fileAttachments, I get

Code: Select all

"errorMessage": "Invalid field 'total' at position 20."

gkisssec
User
Posts: 4
Joined: Thu Aug 29, 2019 11:30 am

Re: Querying nested fields

Post by gkisssec » Wed Nov 13, 2019 12:15 pm

Managed to find out.

Code: Select all

!fileAttachments.id: [* TO *]
shows me people with no file attachments.

gkisssec
User
Posts: 4
Joined: Thu Aug 29, 2019 11:30 am

Re: Querying nested fields

Post by gkisssec » Tue Nov 19, 2019 6:12 am

zgonza wrote:
Fri Nov 08, 2019 3:37 pm
Hello,

I was able to pull together a string that may work. I have included it below. Take a peek and let me know if you are having troubles moving forward.

/search/Candidate?fields=*&query=fileAttachments.id[1 TO 99999999999] AND isDeleted:false

Cheers,

Thanks zgonza. I managed to figure it out as the moderators took quite a few days to approve your comment, but your help was exactly what I would have needed :mrgreen: . Much appreciated!

Post Reply