- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2016 09:41 AM
Hi all,
I have a basic question. I have a catalog item and have created a variable called requested for(requested_for) on the catalog item. The value of this field needs to be passed to the requested for field(requested_for) on the request table (sc_request). How do I achieve this?
As you can see in the below screenshot, requested for value is Abel tutor in the catalog item form. I want this value to be passed to the request table instead of System Administrator. Please help.
Thanks & Regards,
Akriti
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2016 08:31 AM
Sorry, this script should be on sc_request table and change it from after to before business rule and put this script in there. You are good to go
var gr= new GlideRecord("sc_req_item");
gr.addQuery('request',current.getValue("sys_id"));
gr.addQuery("item.name","put your item name here");
gr.query();
if(gr.next()){
current.requested_for=gr.variables.requested_for;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2018 01:27 AM
Hello Abhinay ;
I am new to servicenow.
I tried the same script but something is going wrong please can you help me out.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2016 06:22 PM
Let me if I have answered your question. If yes, please mark my response so that others who have same question can find the answer quickly.
If you are viewing this from the community inbox you will not see the correct answer button. Please open the thread directly, then you should see a Correct Answer button with red star.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2016 09:18 AM
You bet!! Glad you got your question answered.