How to write the Catalog Client script for the Approval Process based on the other selection?

Service Now4
Giga Contributor

Hello Everyone, 

I have a requirement that, - Create a New Group like, "Infrastructure Approval" with Approval names in it and add this group to the workflow. Actually,the "Infrastructure Approval" only to be the part of the approval process for the citrix option of this form, not for all the other options. 

Here, I have Created a New Group like,"Infrastructure Approval" with Approval names in Workflow. And i have created a few requests for, if we select the "Citrix" option in 'Targeted OS', the "Infrastructure Approvals" were trigger(It is working fine). But, Here The Infrastructure Approvals were triggered when the Citrix is unselected(it means when we select other options).

Could anyone please suggest me how to write the Script in Workflow for "Infrastructure Approval"/ Catalog Client Script for this( "Infrastructure Approval" only to be the part of the citrix option of this form, not for all the other options)? or if any other usage works?

For your reference, Please find the below Screenshots.

find_real_file.png

find_real_file.pngThanks&Regards,

Jayashree

1 ACCEPTED SOLUTION

Akshata jamdar
Mega Guru

Hello Jayashree,

 

Instead of writing catalog client script you can simply use wait for condition activity and set condition as 

citrix is true.

 

Hope this will help you.

Kindly mark an answer as correct and helpful if it will resolve your query.

Regards,

Akshata

(ServiceNow Developer)

View solution in original post

10 REPLIES 10

Thank you for marking the answer as helpful.

 

there is option for variables, please refer below

find_real_file.png

 

You need to specify catalog item then variable (in this case citrix) is true.

 

Hope this will be the answer which you want.

 

Regards,

Akshata

 

Hi Akshata,

I have created the same condition and published the workflow.

find_real_file.png

and i have created a few request like, if we select other than Citrix it should not go to the "Infrastructure Approval". Yes it's working it showing the Approvals are no Longer required. But here after this performance, the request state is closing it is not moving to the next stages.

find_real_file.png

find_real_file.png

Can you please look up the place for wait condition in Workflow.Is that place i have used the Wait condition is correct?

find_real_file.pngThanks&Regards,

Jayashree

Hi Akshata/Ankur,

The issue is resolved now. I used if Condition instead of wait. It is working now.

find_real_file.pngif{ Yes - If the User selects "Citrix",it goes to the Infrastructure Approval and next Approvals.

find_real_file.pngif{No - If the User selects other than "Citrix",it automatically skip the Infrastructure Approval and it is going to the Next Approvals to Approve.

find_real_file.pngRegards,

Jayashree

Hi Jayashree,

That is what I mentioned in my earlier comments.

Did you accidentally marked your own answer as correct

if my answer helped you, kindly mark it as Correct & 👍Helpful so that it does not appear in unanswered list & close the thread.

Regards
Ankur

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

Hello jayashree,

Thank you for marking the answer as correct and I got to know what exactly wrong in this kind of scenarios. 

Thank you once again.

 

Regards,

Akshata