Zoho Recruit Use Cases for Validation Rules Using Functions

Zoho Recruit Use Cases for Validation Rules Using Functions

Make detailed description mandatory if specific terms are entered in the field

Zylker Tech manufactures electronic assemblies and similar other products. Their manufactured items are outsourced for quality check to a third-party service provider. The assessment results are shared with the production managers through the assessment and evaluation report. Often times it has happened that important fields in the form are either left blank or the description given is unclear. This lack of information results in to-and-fro communication that causes delay in further processing and also poses problem when they plan on implementing the details to their process improvization plans. In order to arrest such issues in the future reports, the production managers decide to put a check that prompts the users to enter detailed description whenever they enter certain terms in the fields.

 

Here's the validation rule that needs to be configured for the desired result:

Validate the field to throw error if the user enters any of these values - miscellaneous, not specific, recommended, critical, nondescript. The alert message will be: You have used term(s) that need to be described more specifically. Please enter a comprehensive description.  

 

 

Function for the above rule:

if(Description.contains("miscellaneous") || Description.contains("recommended") || Description.contains("critical") || Description.contains("not specific") ||

Description.contains("nondescript")) {

  response.put('status','error');

  response.put('message', 'You have used term(s) that need to be described more specifically. Please enter a more comprehensive description.');

} else {

 

Validate the pattern of the mailing zip code for each country

 

Validate that the zip code entered in the mailing address follows a particular format for the following countries:

 

*Add the below codes to the snippet where indicated.

 

1. Country is Bangladesh the zip code should be in 9999 format.

condition: zipCode.matches("([0-9]{4})" ) == false

2. Country is Canada the zip code should follow this format A9A 9A9.

condition: zipCode.matches("([A-Z]{1}[0-9]{1}[A-Z]{1}[0-9]{1}[A-Z]{1}[0-9]{1})") == false

3. Country is Jamaica the zip code should begin with alphabets followed by number, in this format AAAAA99.

condition: zipCode.matches("([A-Z]{5}[0-9]{2})") == false

4. Country is Latvia the zip code should have alpha character, numeral and hyphen in this order, AA-9999.

condition: zipCode.matches("([A-Z]{2}-[0-9]{4})") == false


Validate the Regex expression of identification data such as IBAN 

 

Some data follow a specific format and expression that changes with respect to individual country. Data like IBAN (International Bank Account Number) follows a particular structure that includes the country code followed with the account number. Not only that, the number of characters in the account number varies from every country.

 

*Add the below codes to the snippet where indicated.

 

1. Country is Albania the IBAN number should begin with the country code AL followed with account number in 28 numeric characters.  

condition: IBANNumber.matches("(^(AL)[0-9]{28})") == false

2. Country is Belgium the country code should be BL followed with account number in 16 numeric characters. 

condition: IBANNumber.matches("(^(BL)[0-9]{16})") == false

3. Country is Germany the country code should be DE followed with 22 numeric characters for account number. 

condition: IBANNumber.matches("(^(DE)[0-9]{22})") == false

 

Validate the format in which the ISSN number should be entered

 

ISSN (International Standard Serial Number) is a unique, eight digit serial number that identifies the publication code. The number is represented in a specific pattern like: two four-digit numbers divided by hyphen (0378-5955). While searching for an article using the ISSN code, the number must be entered in the given format. So you can validate the format of the ISSN field using function.

 

*Add the below code to the snippet where indicated.

condition: ISSNNumber.matches("([0-9]{4}-[0-9]{4})") == false


Validate the phone number has international format

 

In personal information, the contact numbers entered by the customers should follow the international format. So, validate that the phone number field stating, the number must start with + followed by the country code and national number. You can enter the country codes in the function.

 

*Add the below codes to the snippet where indicated.

 

1. The UK based number should be in this format +44-20-999999999.

condition:   phoneNumber.matches("(^(\+44-20)-[0-9]{9})") == false

2. The US based number should be in this format +1-999-999999999.

condition:   phoneNumber.matches("(^(\+1)-[0-9]{3}-[0-9]{9})") == false

3. The Netherlands number should be like this +31-99-999999999.

condition:   phoneNumber.matches("(^(\+31)-[0-9]{2}-[0-9]{9})") == false

 

Restrict the reps from entering any past dates as closing date

 

A rep should be restricted from entering a past date in the closing dates. For example, if the sales person edits the deal closing date then he should be prevented from entering any past date. They should update the field with future date only.

 

*Add the below code in the snippet where indicated.

condition: days360(today, closingDate.toDate()) > 0

    • Related Articles

    • Zoho CRM Use Cases for Validation Rules Using Functions

      Make detailed description mandatory if specific terms are entered in the field Zylker Tech manufactures electronic assemblies and similar other products. Their manufactured items are outsourced for quality check to a third-party service provider. The ...
    • Zoho Recruit Workflow Rules

      Workflow Rules in Zoho Recruit are a set of actions (alerts, tasks, and field updates) that are executed when certain specified conditions are met. These rules automate the process of sending email alerts and SMS alerts, assigning tasks, and updating ...
    • Zoho Recruit Creating Conditional Layouts using Layout Rules

      What is a layout rule? Your recruitment data is often inter-dependent. When you are creating a record for a candidate, not all the fields in the layout are utilized. For example, if the candidate is a fresher he would not need the Previous Experience ...
    • Zoho Recruit Validation Rules In Zoho Recruit

      Validation rules can improve the accuracy and consistency of the data in Zoho Recruit. These rules enforce specific requirements or restrictions on the data entered, such as filling out specific fields or entering data in a particular format. ...
    • Zoho Recruit Module Customization

      Modules in Zoho Recruit Modules in Zoho Recruit let you categorize and track various aspects of your recruitment process. Modules in Zoho Recruit are represented as tabs in the app, such as Job Openings, Contacts, Clients. There are two kinds of ...