g_scratchpad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2019 06:28 PM
Hi Team,
Can someone explain me where the value is displayed in the form after we retrieve the value from g_scratchpad using client script, NOTE: g_scratch pad is used to get the value from the server which is not there in the client end. So after we get the value from g_scratchpad will it create a field in the client form to display the value which is fetched from the g_scratchpad or this will display like a popup.
Also want to know if there is client/server synchronization then why we cannot directly pull the info using client script rather than using g_scratchpad.?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2019 09:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2019 09:46 PM
All the information in a client form is displayed from the server, even all the values are also stored in the server, so why there is special case for the usage of g_scratchpad, In the above code you can display the message by using i
f(newvalue=='true')
alert("helloworld")
This is also possible

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2019 10:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2019 11:56 PM
Really sorry that i am behind you, just not getting the right point.
Please understand me,
- The value of the system property css.base.color
- Whether or not the current record has attachments
- The name of the caller's manager
g_scratchpad.css = gs.getProperty('css.base.color'); g_scratchpad.hasAttachments = current.hasAttachments(); g_scratchpad.managerName = current.caller_id.manager.getDisplayValue();
// Check if the form has attachments if (g_scratchpad.hasAttachments) // do something interesting here else alert('You need to attach a form signed by ' + g_scratchpad.managerName);
The value of the system property css.base.color ( does this mean that client requested the system properties via incident)
Whether or not the current record has attachments ( Why the user want to know the curent record has attachment )
The name of the caller's manager( what is the scenario behind these request, why the end user needs this information )
What is the purpose behind this script written, In the end user perspective can you please tell me because I am just a user who have the access to servicenow instance,