Search records in Zoho Recruit

Search records in Zoho Recruit

Overview

This task is used to search and fetch required records from Zoho Recruit.

Syntax

<variable> = zoho.recruit.searchRecords(<module_name>, <searchCondition>, <fromIndex>, <toIndex>, <selectColumns>, <connection>);

where,

ParameterData typeDescription

<variable>

 LIST

is the variable which will hold the response returned by Zoho Recruit. 

<module_name>

 TEXT

is the Zoho Recruit module in which the records will be searched.

Following are the applicable modules:

CandidatesJob OpeningsContactsClients

<searchCondition>

 TEXT

Condition based on which the records will be fetched.

The condition must be in the following format: 
"<colName>|<operator>|<colValue>" 

Following are the applicable operators: 

  • is (or) = 
  • isn't (or) <> 
  • contains (<colValue> should be in the format *<colValue>*) 
  • starts with (<colValue> should be in the format <colValue>*) 
  • ends with (<colValue> should be in the format *<colValue>) 
  • doesn't contain 
  • is before (or) < 
  • is after (or) > 
  • <= 
  • =>

Refer this page to know about field names in Zoho Recruit.

<fromIndex>

<toIndex>

(optional)

 NUMBER

<fromIndex> is the starting index of the records that need to be retrieved.

<toIndex> is the last index of the records that need to be retrieved.

Only first 20 records will be fetched if <fromindex> and <toindex> params are not specified. 

You can specify the <fromindex> without specifying <toindex>, in which case 20 records will be fetched starting from the specified <fromindex>.

The <toIndex> param cannot be specified without the <fromIndex> param.

Using <fromindex> and <toindex> params you can fetch upto 200 records. So, if the difference between the <fromindex> and <toindex> exceeds 200, only the first 200 records will be fetched.

<selectColumns>

(optional)

 TEXT

Field names whose values will be included in the fetched records.

Multiple column names can be specified, each separated by a comma. 

If this param is not specified, all field values will be included in the fetched records.

For more details, refer to Zoho Recruit API help

<connection>

(optional)*

TEXT

specifies the name if the Zoho Recruit connection.

*Note: This param is not supported in Zoho Creator, and is optional in all other Zoho services.

Fetch records from Candidates module by specifying a criteria

The following script fetches records from the "Candidates" module, based on the specified criteria, fromIndex, toIndex and selected columns in Zoho Recruit.

response=zoho.recruit.searchRecords("Candidates", "Industry|=|Chemicals", 1, 3, "Candidates(Last Name,Email)");

where,

"Candidates"
is the module from which the records will be fetched. It is of TEXT data type.
"Industry|=|Chemicals"
is the criteria based on which the records need to be fetched. It is of TEXT data type.
1
is the index of the first record which needs to be fetched. It is of NUMBER data type.
3
is the index of the last record which needs to be fetched. It is of NUMBER data type.
"Candidates(Last Name,Email)"
is the selected column names of the records which needs to be fetched. It is of TEXT data type.

Sample Response

The following is a sample success response:

{  
   "Email":"john@zylker.com",
   "CANDIDATEID":"3342000000267001",
   "Last Name":"Richard"
}

A sample failure response returned when an invalid or incorrect parameter is supplied is below:

{  
   "message":"Invalid parameter value",
   "code":"4832"
}

Related Links

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com