- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I have noticed an issue post Yokohama release.
Simple custom actions that I built no longer work in flows.
The actions work, all logs are as expected when testing the action, but always fails in flows because the data pill (output from the action) seems empty - log messages go empty or undefined.
I was able to create custom actions with custom scripts before the Yokohama release.
Inputs
Script step
(function execute(inputs, outputs) {
// Log the entire inputs object for debugging
gs.log("Inputs: " + JSON.stringify(inputs));
// Check if table and field inputs are provided
if (!inputs.table || !inputs.field) {
throw new Error('Table and field inputs are required.');
}
// Retrieve the table sys_id and field from inputs
var tableSysId = inputs.table;
var field = inputs.field;
// Retrieve the table name using the sys_id
var tableRecord = new GlideRecord('sys_db_object');
if (!tableRecord.get(tableSysId)) {
throw new Error('Invalid table sys_id: ' + tableSysId);
}
var tableName = tableRecord.name;
// Log the table name for debugging
gs.log('Table name: ' + tableName);
// Retrieve the sys_id(s) from the lookup records action
var sysIds = inputs.sys_ids;
// Log the sys_ids for debugging
gs.log('sys_ids: ' + JSON.stringify(sysIds));
// Check if sysIds is defined and not empty
if (!sysIds) {
throw new Error('sys_ids input is required.');
}
// Split the sys_ids by new line or comma
var sysIdsArray = sysIds.split(/[\n,]+/);
// Log the sysIdsArray for debugging
gs.log('sysIdsArray: ' + JSON.stringify(sysIdsArray));
// Initialize an array to store the field values
var fieldValues = [];
// Iterate through each sys_id and retrieve the corresponding field value
sysIdsArray.forEach(function(sysId) {
var record = new GlideRecord(tableName);
if (record.get(sysId.trim())) {
var fieldValue = record.getValue(field);
gs.log('Field value for sys_id ' + sysId + ': ' + fieldValue);
fieldValues.push(fieldValue);
} else {
gs.log('Record not found for sys_id: ' + sysId);
}
});
// Log the field values for debugging
gs.log('Field values: ' + JSON.stringify(fieldValues));
// Set the output as an array of strings
outputs.field_values = fieldValues;
// Log the output for debugging
gs.log('Output field_values: ' + JSON.stringify(outputs.field_values));
})(inputs, outputs);
end of script step ----
I have also tried using Output type of array.string & array.object...
I opened a HI case but ServiceNow will not address because custom code is involved.
I guess that means ServiceNow allows but does not support custom actions used in Flow Designer.
Pretty crappy on ServiceNow's part if you ask me - they system is too rigid and returns data not helpful to humans, sys_id s as opposed to something identifiable by a human.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Flow designer post Yokohama displays empty data pills if the pill is the result of a custom action. The pills will work as expected when testing but will not work in a flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Saturday
I look forward to the upcoming ability to debug custom scripted actions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I am putting together a guide with data pill outputs and new limitations. I noticed that a simple input value is Processed: (your expected value) as opposed to just being the expected value.
Ex. I hard coded the value a to a string output.
step from testing & log results of the data pill = Processed: a
In the case of my custom action, ServiceNow does not seem able to de-stringify data pills anymore and HI Support mentioned they will not support because related to a custom script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @LonLandry1
-
Before Yokohama, Flow Designer was lenient: you could set outputs.field_values = someArray and Flow Designer would try to coerce it into the declared output type.
-
Post-Yokohama, the platform enforces strong typing. If your action’s Output is defined as Array.String, then the object assigned to outputs.field_values must be a proper JavaScript array of strings—not a GlideRecord value, not an object, not undefined.
(function execute(inputs, outputs) {
var sysIdsArray = (inputs.sys_ids || '').split(/[\n,]+/).map(function(s){return s.trim();});
var fieldValues = [];
var gr = new GlideRecord(inputs.table_name); // <-- pass table_name directly instead of sys_id if possible
sysIdsArray.forEach(function(sysId) {
if (gr.get(sysId)) {
var val = gr.getValue(inputs.field);
fieldValues.push(val ? String(val) : '');
}
});
// Safe output
outputs.field_values = fieldValues; // must match Array.String
})(inputs, outputs);
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
ï”— YouTube: https://www.youtube.com/@learnservicenowwithravi
ï”— LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
No luck. ServiceNow does not seem to want any values displayed outside of sys_id s.
ServiceNow seems to be getting more anti-human every day.
In the end all we want is to be able to see something other than a sys_id - which is useless to a human.
The recent Yokohama breaks dozens of our flows that have worked for years and stops ServiceNow from being legible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Flow designer post Yokohama displays empty data pills if the pill is the result of a custom action. The pills will work as expected when testing but will not work in a flow.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Do you have some SN documentation that verifies and explains this, or is this just your experience?