How to use 'Array' variable in 'For Each Item In' in Flow Designer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2022 05:28 AM
Hello Experts,
My use case is I need to send multiple files in base64 string in SQL table's Content column.
Following (Screenshot no. 2) is the test Action that we created for sending one attachment in base64 string which is working fine.
But our actual use case is, SN record form can contain 2 PDF files so we need to send 2 base64 string in SQL table's Content column (one after another) by putting in loop.
I know we can use the For Each flow logic (in Screenshot No. 1), in order to do that in Action (Screenshot No. 2) we created output variable u_base64 with variable type as Array.String but unfortunatley u_base64 (type Array.String) not appearing in For Each Item in (Screenshot No. 1). So how to resolve this? (do we need to change the varibale type?) or (do we need to change the approach sending multiple base64 string one by one?)
Please advise
Screenshot No. 1
Screenshot No. 2
- Labels:
-
flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2022 07:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2022 07:38 AM
Hi,
check this
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
‎08-30-2022 04:31 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
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
‎10-20-2022 05:34 PM
It sounds like you created the output for only the script step but not the action itself. The output of a script step is not accessible outside of the action.
Go to Outputs (under error evaluation), create an output variable, exit edit mode then you can assign the value for that output variable by dragging n dropping the script step's output.