- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 03:39 AM
Scenario: I need to pass input values from a ui action to a flow designer and based on those input values i need to continue my flow in the flow designer.
Any guidance is appreciated.
Thanks and Regards,
Vasu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 03:10 AM
Hi,
please share the setup
check this
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 03:46 AM
Hi,
you can make UI action as server side and send values to flow as inputs
I assume your flow is also on same table where UI action is defined.
Scripting with Flows, Subflows, and Actions
(function() {
try {
var rec_id = current.sys_id;
var gr = new GlideRecord(current.getTableName());
if (gr.get(rec_id)) {
var inputs = {};
inputs['current'] = current; // GlideRecord of table:
inputs['table_name'] = current.getTableName();
inputs['email'] = 'your email'; // input to flow
// Start Asynchronously: Uncomment to run in background.
// sn_fd.FlowAPI.startFlow('flow name', inputs);
// Execute Synchronously: Run in foreground.
sn_fd.FlowAPI.executeFlow('flow name', inputs);
}
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}
})();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 03:52 AM
Thank you so much, this is helpful. How can i receive these input values in the flow designer?
Best Regards,
Vasu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 04:00 AM
Hi,
you can create flow variable with that name and use it
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 03:06 AM
Thank you so much again .The flow variable is taking values through the course of the flow but not the values passed from the ui action.Can you please help out?