Expertise Folks kindly help !!!

Raj_7apr
Tera Contributor

 

 

 

 

Hi everyone, I'm currently self-learning ServiceNow and exploring its features.

I've successfully created a task where, upon selecting an Employee Department and Employee Designation, the Hotel Type auto-populates. This part is working as expected (screenshot with options attached).

Based on this, I created a second task around cricket, with fields for the top 5 countries, player grade, and player auction. My goal is to have the 'player auction' field auto-populate based on the selected country and player grade.

Is this feasible? I've been trying for a while without success and would appreciate any guidance. Thanks!

Raj_7apr_0-1730407881940.png

 

2 REPLIES 2

Bert_c1
Kilo Patron

I suggest you post what you've tried, so folks here can assist. My guess is you may be using a Client Script.

Runjay Patel
Giga Sage

Hi @Raj_7apr ,

 

You can create on change client script on both filed (country and player grade) with same script like below.

var country = g_form.getValue('u_country); // put your country field name.
var grade = g_form.getValue('u_grade); // put your greade field name.

If(!(grade =='' || country =='')){

If(grade =='xyz' && country =='abc'))
      g_form.setValue('u_auction', 'Put your value');
else If(greade =='xyz1' && country =='abc2'))
      g_form.setValue('u_auction', 'Put your value2');

// and so you can add. If condition have more than 3 case then you can use switch case instead of if else

}else{
 g_form.clearValue('u_auction');
}

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

 

 

 

 

In this video i have explained about Web service integration in ServiceNow like how it works, how we can configure it, what are the prerequisite and many more. I have covered below topics in this video. 1. understand Web Service. Like when and how we will use it. 2. Talked about Inbound and ...