Create a search

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
aap3
User
Posts: 7
Joined: Mon Oct 03, 2011 10:01 am

Create a search

Post by aap3 » Mon Oct 10, 2011 11:36 am

How do i create a search so a suer can have a keyword search box then also search by location, salary etc like other sites?
Do i need to use the Where clause ?

MMartin4
User
Posts: 29
Joined: Wed Dec 31, 1969 8:00 pm

Re: Create a search

Post by MMartin4 » Mon Oct 17, 2011 9:59 am

Hi aap3,

I'm not 100% clear on what it is you're asking here, but I'll try to address your question as best as I can.Though we cannot help you with how to specficially implement the web services API for any particular purpose, it seems like what you want to use is the query operation.

We recommend using version 2.0 for any new development. The application logic for taking the key words inputted but one of your users into a form (or via some other method) and then formulating the WHERE clause is up to you, however, it's possible. The query operation accepts a string in the form of syntactically correct WHERE clause. The operation returns the id of the record you are looking for. You would then use the find operation to retreive the actual details of that record.

Hope this helps

Michael Martin
Enterprise Technical Support Analyst

aap3
User
Posts: 7
Joined: Mon Oct 03, 2011 10:01 am

Re: Create a search

Post by aap3 » Thu Oct 20, 2011 5:16 am

Thanks for the reply I am trying to use the following but it fails:

Code: Select all

isOpen = '1' and (description like '%$desc%' or title like '%$desc%')

k.pham
User
Posts: 21
Joined: Thu Jun 24, 2010 5:13 pm

Re: Create a search

Post by k.pham » Fri Oct 21, 2011 12:14 pm

aap3, what's the error?
I just tried the following where clause and it worked fine for me.

<where>isOpen = 1 and (description like '%test%' or title like '%test%')</where>
This also worked:
<where>isOpen = '1' and (description like '%test%' or title like '%test%')</where>

aap3
User
Posts: 7
Joined: Mon Oct 03, 2011 10:01 am

Re: Create a search

Post by aap3 » Mon Oct 24, 2011 5:51 am

This is the error I am getting:

Code: Select all

NULL org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [FROM com.bullhorn.entity.job.JobOrder WHERE id IN ()]

k.pham
User
Posts: 21
Joined: Thu Jun 24, 2010 5:13 pm

Re: Create a search

Post by k.pham » Thu Oct 27, 2011 1:54 pm

Could you post the code snippet where you declare the where clause and how you define $desc?

Post Reply