Setting check box variable value to false on RITM if the approval is rejected

jitendrag
Tera Expert

Hello Everyone,

 

I have a requirement that to send the approval request  based on the user selected checkbox. Once the approval is rejected then I need to set the check box value to false.

 

Can anyone please help how to achieve this.

 

Jitendra

1 ACCEPTED SOLUTION

@jitendrag 

then check the approval record status is Rejected or not using Lookup record and then update the variable value

you will require script for this using custom action OR take another route mentioned in below link

Setting, or updating variables in flow designer 

another link

Set Value of a Catalog Variable at Flow Designer 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@jitendrag 

if you are using workflow and User approval activity then on the path which takes to Rejection you can have run script and set the variable as this

current.variables.variableName = false;

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

 

I am using Flow designer and not a work flow

 

@jitendrag 

then check the approval record status is Rejected or not using Lookup record and then update the variable value

you will require script for this using custom action OR take another route mentioned in below link

Setting, or updating variables in flow designer 

another link

Set Value of a Catalog Variable at Flow Designer 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Dnyaneshwaree
Mega Sage

Hi @jitendrag,

Have you tried it by using business rule? if not please try it by using below information:

Table: RITM
After update
Condition: approval changes to rejected

script logic: 

        g_form.setValue("abc", 'false'); // use your checkbox variable name and backend name of false value 

Mark it Helpful and Accept Solution!! If this helps you to understand.

Thanks in advance!!
 
Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!

Dnyaneshwaree Satpute
Tera Guru