
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 04:53 AM
Once I am creating a Catalog Item which is having a Description value 'DESCRIPTION' & Short Description value as 'SHORT', then how can the same values be auto-populated on the Request Form's Description & Short Description field
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2018 09:58 PM
Hi,
Thanks all for your guidance. I got a solution to this by writing this script in 'Run Script' in the workflow
request.description = current.variables.description;
request.short_description = current.variables.short_description;
This solved the issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 11:44 AM
You can write a business rule on Requested Item to do so. The Business rule can be async.
var req = new GlideRecord('sc_request');
req.addQuery(current.request);
req.query();
if (req.next())
{
req.short_description = current.cat_item.short_description;
req.description = current.cat_item.description;
req.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
‎03-12-2018 10:28 PM
Hi Sanjiv,
What I want is I have a catalog item which has 2 fields Description & Short Description(which is visible when I click on Try It). Now, suppose I enter Sanjiv in Description field & Meher in Short Description field & click on Order Now. I will be getting the REQ no. right, now, what I want that if I click on this REQ no. and when I am redirected to the REQ Form, the Description & SHort Description should show me 'Sanjiv' & 'Meher' respectively.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 11:26 PM
Got it. You can use below script, considering your variable name in catalog item is short_description and description respectively.
var req = new GlideRecord('sc_request');
req.addQuery('sys_id',current.request);
req.query();
if (req.next())
{
req.short_description = current.variables.short_description;
req.description = current.variables.description;
req.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
‎03-12-2018 11:47 AM
Keep in mind the Request is not associated to the Catalog Item except through the Request Item. The issue is that there could be multiple Request Items related to each Request, so you may have Request Items overwriting the values in the Request. The Request would end up only displaying the information for the last Request Item that was created.