
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2018 03:49 PM
I have created a catalog item using maintain items. One of the variables is 'If a single property, which property is the request for?'. The variable name is location. I tried mapping it using :
gr.requested_for.location = current.variable.location;
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2018 02:28 PM
Close, the correct answer is :
gr.location = current.variables.requested_for.location;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2018 04:06 PM
Are you trying to copy the value in the location variable to location in request. If so, you can do it using
gr.request.location = current.variables.location;
provided gr is the object you created for sc_request table and this is a business rule running on sc_req_item
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
‎04-24-2018 04:13 PM
this is the entirety of the code, which is found in a 'run script' in the workflow. I added the above script, but no joy.
var gr = new GlideRecord('sc_request');
if (gr.get(current.request)) {
gr.short_description = current.cat_item.getDisplayValue() + " for " + current.variable.InfoGOutlets.getDisplayValue();
gr.assignment_group = current.assignment_group;
gr.requested_for = current.variable.requested_for;
gr.request.location = current.variables.location;
gr.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2018 05:02 PM
Ok.. Got it. Use below code. This script should be on Requested Item table
var gr = new GlideRecord('sc_request');
if (gr.get(current.request)) {
gr.short_description = current.cat_item.getDisplayValue() + " for " + current.variable.InfoGOutlets.getDisplayValue();
gr.assignment_group = current.assignment_group;
gr.requested_for = current.variable.requested_for;
gr.location = current.variables.location;
gr.update();
}
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
‎04-30-2018 10:15 AM
Thank you again. I really appreciate your assistance.