- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I created a custom action to use in a flow. Basically what it does is look at a system property containing usernames in a CSV format. (ex. username1,username2,username2) It can be used for other types of system properties in that format, I just happen to be working with one that has usernames.
Inputs:
Script step:
Code snippet for easy reading:
(function execute(inputs, outputs) {
var raw = inputs.system_property || '';
gs.log("CSV Parser - Raw Input: [" + raw + "]", "CSVParser");
var parts = raw.split(',');
var cleaned = [];
for (var i = 0; i < parts.length; i++) {
var val = parts[i].trim();
if (val) {
cleaned.push(val);
}
}
gs.log("CSV Parser - Cleaned Array: [" + cleaned.join('|') + "]", "CSVParser");
outputs.array = cleaned;
})(inputs, outputs);
In the log statement in the script, I can see that I'm getting the proper usernames when the action executes. However, in my flow, something isn't translating. I added a log step and added the output variable "Array" in the message, but it shows up blank.
Log action in my flow:
System log:
What am I missing here? I set this up similar to another custom action I have, granted that one is a string instead of an array.string, but I can't seem to figure out why this isn't working correctly.
TIA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I ended up comparing to another custom action in the system, and it looks like adding that Array pill to the Outputs section of action now shows it in the logs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I ended up comparing to another custom action in the system, and it looks like adding that Array pill to the Outputs section of action now shows it in the logs.