
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 08:36 AM
Hi there,
I am looking to pull a Variable Set into the Short Description of an SCTASK. I am able to bring variables in, however I have checkbox selections which were created in a variable set. They are set to "when one is selected, the other options are disabled. What I am hoping to achieve here is to show that Variable of the Variable Set to appear in the Short Description of the SCTASK.
This is the workflow code I have but because it's a variable set, it doesn't work:
workflow.scratchpad.findApproverTask = task.setNewGuid();
var str1 = "Supply Chain";
var obj = new c_getCatalogItemDetails();
str = obj.getDetails();
task.short_description = str1 +" - "+ current.cat_item.getDisplayValue()+" - "+current.variableset.checkbox_selections_sap_var.getDisplayValue();
task.description = str;
task.work_notes = str;
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 08:48 AM
you need something like
var notes = '';
if(current.variables.po_pr_support_sap == 'true'){
notes += "PO/PR Support,";
}
if(current.variables.reporting_sap == 'true'){
notes += "Reporting,";
}
task.short_description = str1 +" - "+ current.cat_item.getDisplayValue()+" - "+ notes;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 08:48 AM
you need something like
var notes = '';
if(current.variables.po_pr_support_sap == 'true'){
notes += "PO/PR Support,";
}
if(current.variables.reporting_sap == 'true'){
notes += "Reporting,";
}
task.short_description = str1 +" - "+ current.cat_item.getDisplayValue()+" - "+ notes;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 09:00 AM
Way too awesome, that did the trick. Thanks so much Mike, I really appreciate it!