Passing data to a Sub Flow Input of Array.String type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2025 12:30 PM - edited 09-26-2025 12:31 PM
So I have a Sub Flow with an input variable of type Array.String and it's named 'pcname'. If I test the flow and just type a name in there it works fine. However, when I use the Code Snippet and try to pass a string variable (converted to an array) to that Sub Flow input, it errors out.
How do I pass data to the 'pcname' "Array.String" input variable on the Sub Flow? I am just passing 1 variable for now.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2025 01:05 PM
Hi @Steven Parker - It looks like your subflow input is Array.String, so it wants an array of string primitives. Just pass it like inputs['pcname'] = [current.variables.computer_name.toString()]. Don’t use .join(), that collapses the array into a single string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2025 01:15 PM - edited 09-26-2025 01:24 PM
That change allowed the Sub Flow to run, but it's returning this error:
Testing the workflow manually and just providing the RITM sys_id, the PC Name, and the Group ID works perfectly....no issues. But when I try to use the code snippet in a simple catalog item workflow run script is where this is occurring.
I really hope this isn't another issue with Sub Flow and Input Strings and the Flow being eratic or inconsistent like I know exists already. When I compare the Flow Execution of a manual run and the catalog item run, they look identical.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2025 01:40 PM
What happens if you fix the case of the input names to match exactly what the subflow expects (e.g. pcName, groupID, ritm)? I've been somewhat removed from this area for a while now, but I think flow inputs are case-sensitive...so mismatched casing can cause the array to wrap in an object instead of being passed directly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2025 10:17 AM
It doesn't do anything.,...
The Code Snipper you copy gives you all lowercase inputs to use.
I am about to the point of writing my own rest and post message in a run script and ditching Flow Designer all together. Too many inconsistencies and issues with Flow Designer.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
