- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2021 07:49 AM
Hi Team,
I am using a multi row variable set as below. "Item name" is a lookup select box variable and i wanted to configure the manager approval if the requester selects the item name "Other'. How can i setup the same in the workflow.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2021 09:04 AM
You can use a script like this in the Approval - User activity. If the Item Name of Other... is not found in one of the rows, then no approver will be populated, so the activity will be skipped.
var answer = [];
var mrvs = current.variables.mrvs_internal_name;//replace with the internal name of your MRVS
var rowCount = mrvs.getRowCount();
for(var i=0;i<rowCount; i++){//for each row in the MRVS
var row = mrvs.getRow(i);
if(row.item_name == 'Other'){//replace with your MRVS variable name and correct value
answer.push(current.opened_by.manager.toString());
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2021 09:04 AM
You can use a script like this in the Approval - User activity. If the Item Name of Other... is not found in one of the rows, then no approver will be populated, so the activity will be skipped.
var answer = [];
var mrvs = current.variables.mrvs_internal_name;//replace with the internal name of your MRVS
var rowCount = mrvs.getRowCount();
for(var i=0;i<rowCount; i++){//for each row in the MRVS
var row = mrvs.getRow(i);
if(row.item_name == 'Other'){//replace with your MRVS variable name and correct value
answer.push(current.opened_by.manager.toString());
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2021 10:49 AM
Thank you so much Brad it really helped me.
If you have some time please check the below one as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2022 08:20 AM
Hello Brad,
I tried implemented your solution for my requirement but it's not working can you please help me on where i'm missing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 11:59 PM
Hi Brad,
I have created a variable set Account Access Level, Internal name- account_access. Variable name also Account Access Level(drop down) in that drop down if I select Cloud Admin Access in that drop down it should goes to Flex team approval. if other drop downs selected means it should create task. What code should be written in workflow to achieve this ?
could you please suggest?
Thanks,
Sofiya