Approval state gets set to default value.

John Doe3
ServiceNow Employee
ServiceNow Employee

I have an independent table A that contains a 'state' field with some choices, such as 'submitted''approved' and 'rejected'. I created a relationship of this table with the Approval table ("sysapproval_approver"). I defined a Flow that when a record in table A is updated to 'submitted' state then it asks the user for approval. An approval record shows up in the UI as related item of the form of table A. 

I can approve the related Approval record and the correct state gets updated in table A, but if I reject the Approval record the state would be set to 'not requested', which I found out is the default value for column 'state' in '"sysapproval_approver". I can't understand why approve works flawlessly but reject gives me trouble, any helps?

Approve:

find_real_file.png

Reject:

find_real_file.png

1 ACCEPTED SOLUTION

Okay. You just need to update your "Ask for Approval" action here.

For example you need to include both Approve and Reject condition in your Action as shown below:

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

7 REPLIES 7

shloke04
Kilo Patron

Hi,

This should not happen. I have similar scenario working in my instance.

Can you share your flow and details how are you trying to set the value when rejected and how are you generating your approval here.

Please share more details to assist you further.

Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

John Doe3
ServiceNow Employee
ServiceNow Employee

At a high level this is the flow:

find_real_file.png

Trigger is set when a record in table is updated to "submitted", then flow asks for approval: 

find_real_file.png

Then wait for condition : 

find_real_file.png

 

I guess you have only created rule for Approve case, check if you can add reject rule when anyone reject.

find_real_file.png

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Like this:

find_real_file.png

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande