- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2018 04:51 AM
- 8,974 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2018 04:57 AM
Hi,
g_scratchpad is a temporary variable to pass server side values to client side if client need server data. Display business rule is used to initialize scratchpad and make it available to client script.
Ex: if you want caller information then we use it in below manner.
Business rule:
(function executeRule(current, previous /*null when async*/) {
g_scratchpad.email= current.caller.email;
g_scratchpad.phone= current.caller.phone;
})(current, previous);
Client Script :
function onLoad()
{
g_form.setValue('email',g_scratchpad.email);
g_form.setValue('email',g_scratchpad.phone);
Let me know if you need any info.
Thanks,
Ashutosh Munot

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2018 04:57 AM
Hi,
g_scratchpad is a temporary variable to pass server side values to client side if client need server data. Display business rule is used to initialize scratchpad and make it available to client script.
Ex: if you want caller information then we use it in below manner.
Business rule:
(function executeRule(current, previous /*null when async*/) {
g_scratchpad.email= current.caller.email;
g_scratchpad.phone= current.caller.phone;
})(current, previous);
Client Script :
function onLoad()
{
g_form.setValue('email',g_scratchpad.email);
g_form.setValue('email',g_scratchpad.phone);
Let me know if you need any info.
Thanks,
Ashutosh Munot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2018 07:31 AM
Hi Ashutosh,
What is the scope of the g_scratchpad variables?
Can I use the g_scratchpad values assigned by a query/display Business Rule on Table say 'A' in the Client Script on another Table say 'B' ?
Or it is limited to the same table?
Thanks and Regards,
Santhosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2022 05:49 AM
It is limited to the same table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2024 04:58 AM
How to autopopulate same user mail id in mail field