
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2018 08:26 AM
He lo every one,
I want to send a sys_id of a reference field from a Business rule to a Client Script. For that i use the global variable SCRATCHPAD in business rule to fill in the value from the database into scratchpads property, then i user the same scratchpad value in a client script to read the value from the scratchpad.
But i can't manage to fill in the value of the reference field named "assignment_group" in the Business rule because the logs show an empty reference fields value. Here is my Business rules onDisplay code:
g_scratchpad.Assignement_Groupe_SysId = current.assignment_group;
gs.log('g_scratchpad.Assignement_Groupe_SysId = '+g_scratchpad.Assignement_Groupe_SysId+'!!!!!!!!!!!!');
Can someone help me solve this problem please? Because i am a beginner in servicenow
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2018 08:43 AM
Hello all,
Actually the business rule has to be on Display in order for the scratchpad variable to work.
See this link related to scratchpad global variables with business rule: Link.
See the link related to using the scratchpad variables of a workflow: Link.
Kind regards
FIKRI BENBRAHIM Mohamed Jawad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2018 09:16 AM
When i check the log, i find an empty value in g_scratchpad.Assignement_Groupe.getDisplayValue().

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2018 09:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2018 10:07 AM
Yes, because assignment group is reference field.
What value you are getting in current.assignment_group? Can you pass the static value under scratchpad and check the log
g_scratchpad.Assignement_Groupe = 'Test Value';

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2018 08:43 AM
Hello all,
Actually the business rule has to be on Display in order for the scratchpad variable to work.
See this link related to scratchpad global variables with business rule: Link.
See the link related to using the scratchpad variables of a workflow: Link.
Kind regards
FIKRI BENBRAHIM Mohamed Jawad