how to capture custom flow variables from for loop each to SC Task Description
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 04:43 AM
Hello Team,
I'm attempting to add custom flow variables that are flow in order to update the SC Task Description through the flow designer. But that wasn't successful; can somebody tell me what went wrong? I need assistance with the script below.
var ritmSysId = fd_data.trigger.request_item.sys_id;
var rec = new GlideRecord('sc_req_item');
rec.get(ritmSysId);
var response;
response='Requested By: '+rec.variables.requested_by.name+'\n';
if(rec.variables.please_specify_your_action!='')
response+='Please Specify your Action: '+rec.variables.please_specify_your_action.getDisplayValue()+'\n';
if(rec.variables.user_is_requested!='')
response+='Who are you requesting this for: '+rec.variables.user_is_requested.name+'\n';
if(rec.variables.action_to_do!='')
response+='Please choose one of the below: Delete User ID '+'\n';
if(rec.variables.business_justification.getDisplayValue()!='')
response+='Business Justification: '+rec.variables.business_justification+'\n';
return response;
if (fd_data.flow_var.delete != '')
return fd_data.flow_var.delete = 'ID: ' + fd_data._7_for_each.item.id_name.toString() + '\n' + 'System Name: ' + fd_data._7_for_each.item.system_name.toString() + '\n' + 'Technology Name: ' + fd_data._7_for_each.item.technology_name.toString() + '\n' + 'Type of ID: ' + fd_data._7_for_each.item.type_id.toString() + '\n' + 'Owner ID: ' + fd_data._7_for_each.item.id_owner.toString() + '\n';
Thanks,
JRY
0 REPLIES 0