trigger flow from business rule

jean-pauldehaas
Tera Guru

Hi All,

 

i have a flow for decomissioning a pc, the flow should kick off if an update is done from AD on the computer table.

when the computer gets disabled in AD and this information gets updated in servicenow, the flow should kick of and created the requested item that is attached to the flow.

users are also able to manually create the request but when the request is created automatically the approval in the flow should be skipped.

im not sure how to start is there anyone who can hellp me on the way

1 ACCEPTED SOLUTION

@jean-pauldehaas 

I don't think you can pass any other input to flow

You can do this

1) create a hidden variable on your catalog item and set it via onLoad with some value and hide that variable always

2) then check that variable value in your flow

3) if it has value then it means it is submitted via manual request

4) when flow triggers via BR this variable will be empty

This will help you to skip approval

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

14 REPLIES 14

@jean-pauldehaas 

I don't think you can pass any other input to flow

You can do this

1) create a hidden variable on your catalog item and set it via onLoad with some value and hide that variable always

2) then check that variable value in your flow

3) if it has value then it means it is submitted via manual request

4) when flow triggers via BR this variable will be empty

This will help you to skip approval

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

@jean-pauldehaas 

Thank you for marking my response as helpful.

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

with Onload you mean client script right ?

@jean-pauldehaas 

correct.

1) create a string variable with highest order so that it is present towards the end of form

2) then use onLoad catalog client script and set the value and hide it

In this way user won't know there is a hidden variable on form

Then you can use this hidden variable for skipping approval in flow.

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

that works but the variable shows up after submit on the portal page here:

jeanpauldehaas_0-1736252191583.png