removal approvals from custom field after all approvals are apporved

Ash41
Kilo Sage

Hi Team, 

 

I have BR to populate approvers on custom field, want to make custom field empty once all the approvals are approved. Please help

 

@Prince Arora 

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

@Ash41 , seems a duplicate of thread which had a similar ask and was answered already. Check for my comments in the thread.

View solution in original post

5 REPLIES 5

Akshaya Gandhi
Tera Contributor

Could you please brief your requirement?

I have custom field where I populate all appovers users in it on RITM table, from approver table. Once the level approvals are approved, I want to set custom field empty.

Prince Arora
Tera Sage
Tera Sage

@Ash41 

 

I think you can use the same BR for both the case

 

Add conditions like this:

1) u_approvers is empty & approval IS "requested".

OR

2) u_approver is not Empty & approval IS "approved"

 

and in the Business rule you can add check like this:

 

if(current.u_approvers == "" && current.approval == "requested" ){

//same logic which we worked

}else{

current.u_approvers == ""

}

 

Please let me know for question/concerns

Akshaya Gandhi
Tera Contributor

If your BR on the RITM table then you can try with below script as well: 

    /*var approvalGR = new GlideRecord('sysapproval_approver');
    approvalGR.addQuery('document_id', current.request);
    approvalGR.addQuery('state','approved');
    approvalGR.query();
    if(approvalGR.next()){
        current.setValue('//custom field name''');
        current.update();
    }
*/
 
Thank you