Can someone give requirements or use cases on client scripts to improve my scripting skills.

siddharth1
Tera Contributor

Use cases on client scripts to improve my scripting skills.

10 REPLIES 10

  • Users should not be able to set Priority to Critical/High if the category is set to Software.
  • If a user enters a city in a field populate State and Country fields for that particular city
  • depending upon priority, change Priority field color
  • While creating Critical Incident, display a confirmation box(confirm) that “Are you sure to create a critical Incident?” If user click OK then create incident else return false.
  • Show message on start date field that, start date should be less than end date.
  • Validate the user mail id by regex
  • Validate the user mobile phone by regex
  • Create two fields state and city and according to state display the cities in the city field.

 

  1. In college name field if user entered “Pharmacy” then in course dropdown Pharmacy option should be add.
  2.  Create Description field on Student table, and check if user has admin role, then it should not be visible for user.
  3. If Exit date is less than Admission date show error message
  4. Make email Field Read only, whenever user submit form email value automatically set as Student name + course @demo.com                            (ex Prasad.Dhumalmca@demo.com)
  5. User should not be able to Update Exit date before Admission date on list view.

1. Create an two fields state and city and according to state display the cities in city field.
2. If the new value and old value are same show message to user that provide another value.
3. Validate the user mail id.
4. If category is selected as an Inquiry then remove the Impact 1-Low.
5. Show message on start date field that, start date should be less than end date.
6. Check whether the start date is greater than end date, if yes show alert to user that select proper start date.
7. check if user has admin role then it should not be visible for user.
8. How to make the UI Policy and client script not to run during form load. How onChange can be use for both onLoad and onChange.
9. Difference between UI Policy and Client Script.
10. Find the Execution order of client script and UI Policy if both are applied.

Vishal Savajia1
Kilo Sage

 

Hi Siddharth, 
 
This training can also be useful provided by ServiceNow.

Self-Paced: Scripting in ServiceNow Fundamentals - Now Learning (service-now.com)

 

Warm Regards, 

Vishal Savajiani

Nishant Shelar
Mega Expert

Hi Siddharth,

- Create a client script on 'u_person' table, If entered DOB is future date, then display alert message saying " Date of Birth Can't be Future Date"

- Create a client script on 'u_person' table, If email field doesn't contain '@' or '.com' then display alert message saying "Invalid Email Address"

 

Please mark my answer as Helpful/Correct so other can get help.