- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2022 06:10 AM - edited ‎11-01-2022 06:30 AM
Hi guys,
I got two variables in service catalog,
incident created: ref type
watchlist: list collector
I want to autopopulate the watchlist based on the incident record that i choose. Can i get some hints or sol for this
thank you
Solved! Go to Solution.
- Labels:
-
Incident Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2022 07:46 AM - edited ‎11-01-2022 07:48 AM
Hi @rakesh8 ,
Try the below client script code on change of your incident variable:
var inc= g_form.getReference('your_incident_variable_name', populateWatchList);
function populateWatchList(inc) {
g_form.setValue('your_watch_list_variable_name', inc.getValue("watch_list");
}
I hope this help.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2022 06:43 AM - edited ‎11-01-2022 07:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2022 07:21 AM
Hey @Manal AQUIL
I created 2 variables for a particular item, in which when i choose certain incident record in incident create variable( reference type), the watchlist of that particular incident record should be autopopulated in the watchlist variable( list collector type)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2022 07:46 AM - edited ‎11-01-2022 07:48 AM
Hi @rakesh8 ,
Try the below client script code on change of your incident variable:
var inc= g_form.getReference('your_incident_variable_name', populateWatchList);
function populateWatchList(inc) {
g_form.setValue('your_watch_list_variable_name', inc.getValue("watch_list");
}
I hope this help.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2022 09:02 AM
thank you @kamlesh kjmar its working 😄
Can you please give me a gist of the code. Just trying out scripting .
thank you