
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2020 08:58 AM
Hi All,
We have a Assignment group variable in one of ours variable sets. We want to set that assignment group variable value by default for some items (Group value will differ from different items).
How to set that Assignment group variable (present in variable set) value to achieve above condition!!!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2020 09:31 AM
Hi Ganesh,
sample script below
function onLoad(){
g_form.setValue('group_variable', groupSysId);
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2020 09:58 AM
Hi,
You can write onLoad catalog client script for your variable from the variable set and select the applies to as Catlog item and you can select the catalog item name.
Refer the below sample code.
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setValue('assignment_group','62826bf03710200044e0bfc8bcbe5df1'); // sys id of your assignment group
}
Thanks,
Pooja M