Second Approval not required if selected user is same

Ajay Singh2
Tera Contributor

HI All,

 

There is a requirement like in a catalog form there is two field with reference type and one field is Variable filed with name ABC Owner and second field is Variable set Data Owner and both are reference type field with sys_user table and if i select same user in both field than an additional approval is not required only one approval required but if i select both diffrenet user than 2 approvals is required. For example, if Aman is the ABC Owner, provides her approval and then is also one of the Data Owner approvers listed, a 2nd approval is not required to generate for Aman.

How to achieve this in workflow.

 

Thank You!! 

20 REPLIES 20

This is also not working when selecting both same user than also its going to no condition and creating approval for same user.

AjaySingh2_0-1754580382965.png

 

Ankur Bawiskar
Tera Patron
Tera Patron

@Ajay Singh2 

you can use "Get catalog Variables" flow action and have access to the variables

Then use IF flow logic and see both the variable are having same value

OR
1) create a flow variable of type boolean and use script "Set Flow Variables" flow logic to compare and set true/false

2) then use this flow variable in the IF flow logic and accordingly set approval or skip it

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

OlaN
Giga Sage
Giga Sage

Hi,

Should be simple enough just to do a comparison on the variables submitted, and generate different approvals depending on the outcome.

See attached example.

flow-compare-two-variables.png

Ajay Singh2
Tera Contributor

I need this is workflow editor.

I strongly suggest that you migrate to Flow designer, Workflow editor will be removed on new instances from the Zurich release.