approval

Shabbir1
Tera Contributor

Hi 

 

we have requirement that on the task we have multirow variable set ..if anyone update the variable ("test")which is in  multirow variable set and save the task we have to trigger the approval to a group  I have created the after update business rule for this but unfortunately in the when to run filter condition we are not getting the multi row variable set variables names can any one help me in script how to mention this condition and how to achieve this  ..sharing screen shots and scripts 

 

Shabbir1_0-1695378565236.png

 

business rule script

 

(function executeRule(current, previous /*null when async*/ ) {

    var vrGroupApprovers = '1c8f2227db58f190b0eb5b67f4961909'// Approvers Group 
    var approvers = new GlideRecord('sys_user_grmember');
    approvers.addQuery('group', vrGroupApprovers);
    approvers.query();
    while (approvers.next()) {

        gs.log("checkwhile");
        var gr = new GlideRecord('sysapproval_approver');
        gr.initialize();
        gr.sysapproval=current.request_item;
        gr.approver = approvers.user;
        gr.state = 'requested';
        gr.insert();
    }

})(current, previous);
 

 

1 REPLY 1

Prashant Moily
Mega Sage

Hi Shabbir,

 

Try this below-given condition and see if works

 

current.variables.name_of_variable_set.name_of_variable