The CreatorCon Call for Content is officially open! Get started here.

Pass Flow Designer output to Client Script onLoad

Amadeusz Sochac
Tera Contributor

Hello,

I have a simple flow designer that creates approvals on a custom table. The problem that I have is that the custom table needs to make fields non-read only when an approval has been approved. I was thinking about sending an output from the flow designer to an onLoad client script where the fields would be validated.

I cannot however come up with an idea on how to send a true/false type output from flow designer that would be available in client script.

Does in ServiceNow exist an API or any other method to call in client script outputs from Flow Designer?
I was thinking to use GlideFlow.getExecution API but was not able to get any response on client side,

2 REPLIES 2

Zach Koch
Giga Sage

Here is a link to some documentation that may be helpful. Using this API, it is server side, you may be able to use this to get the output needed in an onDisplay business rule to make the info available, and use an onLoad client script to retrieve the data necessary.

Here is a link to the docs and a picture of the relevant method

FlowAPI docs 

ZachKoch_2-1718813589236.png

Also here is another link, if you choose to try to go that route, that explains how to use onDisplay BRs with client scripts using g_scratchpad.

g_scratchpad thread 

 

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

Sandeep Rajput
Tera Patron
Tera Patron

@Amadeusz Sochac You can make a flow/subflow/action client callable . Please refer to https://docs.servicenow.com/bundle/washingtondc-build-workflows/page/administer/flow-designer/task/g... for more information.