
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2018 11:35 PM
I am having a catalog item which is having 3 fields [Name, Location, Contact] which is having its values like [Angshuman , India, E-Mail].
Now I want exact same values with field name to be imported on the Description field on the catalog task. How will this be possible?? If it will be possible using the workflow or we need to create any rule for the same?
Thanks & Regards,
Angshuman
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2018 12:26 AM
In the catalog task activity of the workflow write down advanced script like
task.description ="Name is:" +current.variables.Name+".Product is:"+current.variables.Product ;
Use the variable names in place of bold text as per your need

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2018 11:39 PM
Use a business rule on task table which should be an onBefore Insert BR
var wn = '';
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(current.request_item);// requested item sys_id
set.load();
var vs = set.getFlatQuestions();
for (var i=0; i < vs.size(); i++) {
if(vs.get(i).getLabel() != '' && JSUtil.notNil(vs.get(i).getDisplayValue()) ) {
wn+= vs.get(i).getLabel() + ": " + vs.get(i).getDisplayValue() + "\n";
}
}
current.description += wn;
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-03-2018 11:49 PM
Hi Sanjiv,
Thanks for the help, can you explain me a bit more, so will this BR run for every request that is created for the particular catalog item because I found you have asked to mention the sys_id of the RITM... so I was having the query.
I want the field values to be populated whenever someone creates a request.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2018 11:54 PM
This business rule will be on Catalog Task and should run onBefore and onInsert. So this only runs when a catalog task is created from the RITM. If there are 5 catalog tasks created, this BR will run for all the 5 catalog task to populate the description
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-03-2018 11:56 PM
I am having 2 catalog tasks, and both the catalog tasks should get populated with different field names and values from the catalog item. In that case will this work?