How to use 'Array' variable in 'For Each Item In' in Flow Designer?

Amit Rao
Giga Expert

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

 

find_real_file.png

Screenshot No. 2

find_real_file.png

find_real_file.png

 

4 REPLIES 4

Amit Rao
Giga Expert

@Ankur Bawiskar can you pleas advise one this? thanks

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

check this

Using list collector in Flow Designer 'For Each loop' by converting string into array of string

regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Amit Rao 

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Patrick71
Tera Contributor

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.