What is Global in client script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 08:35 PM
What is Global in client script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 08:49 PM
HI Prathap
We can define many views for a table. Checking global means the client script will run for all the views . If you uncheck that and put the view name then the client script will run only for that view.
Regards
Harsh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 08:53 PM
Hi Prathap,
I believe you are referring to "Global" field on client script form.
It is the Indicator of whether the script applies to all views. When Global is selected, the script runs regardless of what view is being displayed. When Global is not selected, this script runs only if the current view matches the script's view.
Let me know if you have any queries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 11:42 PM
Hi Prathap,
Global application in client script means the script can be used globally meaning to all your applications. While the other options is the name of your other application, if one of the application is selected, it limits the client script to be use on the current application you've chosen.
Please click Like, Heplful Yes or Correct Answer if applicable only.
Best Regards,
Diane Miro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2022 12:02 PM
Diane, this is incorrect. To stop confusion for anyone who sees the above answer in the future.
The correct answer is: If Global is set to true, the client script runs on all views of the selected table the Client Script is associated with. If Global is set to false then the View field will be made available so that you can specify the table view that the Client Script should run on.
It is clearly explained in the documentation: https://docs.servicenow.com/bundle/rome-application-development/page/script/client-scripts/concept/c...
Regards
Paul