what purpose we have client scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2022 06:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2022 06:15 PM
Hi, client scripts are used to alter data and\or the visibility of data in the UI (browser).
If you want a better basic understanding of client script usage you should review the vendor documentation
https://docs.servicenow.com/
Register on the developer portal to spin up a free 'Personal Developer Instance' for testing\experimenting
https://developer.servicenow.com/
and then work through the free learning material available on the developer portal and other learning material available at https://nowlearning.service-now.com/
You can also browse\filter existing community forum questions and articles for those that contain client script related information.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2022 07:04 PM
Excerpt from ServiceNow documentation.
Client scripts allow the system to run JavaScript on the client (web browser) when client-based events occur, such as when a form loads, after form submission, or when a field changes value.
Use client scripts to configure forms, form fields, and field values while the user is using the form. Client scripts can:
- make fields hidden or visible
- make fields read only or writable
- make fields optional or mandatory based on the user's role
- set the value in one field based on the value in other fields
- modify the options in a choice list based on a user's role
- display messages based on a value in a field
Following page is a tutorial on creating Script Scripts.
Following video is an overview of client script