Is there a way to auto-populate a variable from one catalog item to another when open by manager.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 12:29 PM - edited 12-06-2023 12:55 PM
Team,
Is there a way to pull the terminated username variable (requested_for) from one catalog item to another when the manager opens the link from the email notification?
The 3rd screenshot is the second catalog item where I am trying to have this user (SNOW-TEST) be auto-populate.
I have tried both links to pull that but it did not work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 12:48 PM
You can use an onLoad script for this. Below are few examples.
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 12:49 PM
Also I would suggest hide your instance URL from you post.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 12:54 PM - edited 12-06-2023 12:54 PM
Something like this in an onLoad client script should work
function getParameterValue(name) { var url = top.location.href; var value = new URLSearchParams(url).get(name); if (value) { return value; } if (!value) { var gUrl = new GlideURL(); gUrl.setFromCurrent(); value = gUrl.getParam("sysparm_id"); return value; } }
grabbed the script form here for reference
https://www.servicenow.com/community/csm-forum/get-url-parameters-from-client-script/m-p/389334
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response helped in any way