UI Action to Flow Designer

Al-jhon
Kilo Sage

Hello All,

 

Is there a way to pass the data from dialog box to flow designer?

Aljhon_0-1708578043792.png



I want to pass the sysid of user selected from dialog box to the flow designer and trigger the flow when click ok.

9 REPLIES 9

James Chun
Kilo Patron

Hi @Al-jhon,

 

I am assuming you are triggering a Flow from the dialog after it's submitted.

Have a look at this article - https://www.servicenow.com/community/now-platform-forum/triggering-a-flow-with-inputs-from-a-script/...

 

Thanks

Hello @James Chun , yes i want also to trigger a flow after clicking OK in a dialog box and pass parameters at the same time to flow i trigger.

Aljhon_1-1708582561243.png

 





Do you think i can get the data from UI action using Set Flow Variables in FD?
Aljhon_0-1708582517877.png

 

I believe you need to have inputs configured within a subflow/action.

i.e.

JamesChun_0-1708583062941.png

I don't believe there is a way to send it to a Flow variable (I could be wrong).

 

Looks like your Flow is triggered from a service catalog, is there a reason you want to trigger it via script? That may break references within your Flow.

 

Thanks

@James Chun my requirements is to change the Approver using UI Action.
I already created a UI Page where I can select a new approver (reference to sys_user).
And after selecting the user, I want to pass the sysid of the selected new approver to flow and trigger it to update the field "Approver",

Changing the approver using Client Script in UI Pages is not working.
I can change the value but upon saving or updating the form it will revert back to the old approver.
I used script below:

var newapprover = document.getElementById('approver').value;

var sysId = gel('record_sys_id').value;
alert(newapprover); // has value which is the sysid of the selected new approver
alert(sysId); // sysid of the Approval Record

var rec = g_form.setValue('approver', newapprover);
rec.update();


So, my other option is to update the record via Flow Designer, because i can change the value of approver using FD.

And now i'm stucked in passing the data from dialog box to FD.