- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2021 02:00 PM
I have created a simple subflow with an input type of array.string:
Is this type not an array of strings? Perhaps I'm misunderstanding it or forgetting something obvious. I then have a For each logic action so I can loop through this array of strings:
And within the loop I'm simply attempting to print to the log:
When I go to test I enter a test value for just one array element:
When I look at the runtime value it appears to be null as if I never provided a value for this array element.
How can I test the input type of Array.String?
Solved! Go to Solution.
- Labels:
-
flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2021 07:34 AM
Seems you need to refer this blog for help
Using list collector in Flow Designer 'For Each loop' by converting string into array of string
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
01-13-2021 02:10 PM
define an output....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2021 02:34 PM
Well I don't necessarily need an output. I went ahead and defined one although I'm not setting the output in my example I shared. What I am unable to do is print the value of this input type (what I think is an array of strings) to the log. The test doesn't even show that I provided a value at runtime, and I did. I feel there's something fundamental I'm missing here...
While I see null in my original example, the past few tests I see:
{ "my_text": { "my_text_child0": [ "" ] } }
Again, I provided a value prior to running the test.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2021 02:48 PM
Hi,
Your flow looks good. I just tested the same on my side as well and it works. I would suggest deleting the existing input variable and recreating it that might solve this problem. I observe this many times recreation fix these types of issues in flow designer.
Hope that helps!
Regards,
Muhammad
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2021 07:06 AM
I executed cache.do and then completely recreated a separate Subflow to test. I once again gave one array element a value and ran the test. Once again got an empty string even though I entered a value prior to running test:
So then I repeated this on a PDI and same result. Am I do anything wrong with how I'm entering the test value? Here's the latest test: