trigger approvals based on variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 10:21 PM
Hi,
i'm using a MRVS and a variable in that needs to be used for approval, i'm doing this through a workflow.
the below script is being used: but the approvals are not triggering. when i checked through run script it is giving the exact value. Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 10:35 PM
Hi @Anubhav Srivas1,
Try this updated scripts -
var application_details = current.variables.application_details.toString(); // MRVS variables
for (var i = 0; i < application_details.length; i++) {
var tech_domain_owner = application_details[i].tech_domain_owner;
answer.push(tech_domain_owner);
}
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 10:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 11:14 PM - edited 03-26-2024 11:18 PM
Hi @Anubhav Srivas1,
Make sure that variable names are correct. I missed to add JSNO.parse() line.
Updated scripts -
var application_details_mrvs = current.variables.application_details.toString(); // MRVS variables
var application_details = JSON.parse(application_details_mrvs);
for (var i = 0; i < application_details.length; i++) {
var tech_domain_owner = application_details[i].tech_domain_owner;
answer.push(tech_domain_owner);
}
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2024 01:44 AM
it still has the same issue and approvals are not triggering. same error as previous screenshot.