How to iterate an Array.String in the flow designer?

Leonardo Ferrar
Kilo Expert

Hi, 

I am trying to manipulate an array of strings in my action, however it is not possible to iterate each item when I use the output in my flow designer in a for each

find_real_file.pngfind_real_file.png

1 ACCEPTED SOLUTION

Sudhanshu Talw1
Tera Guru

Hi leanardo,

Right now it is returning a string edit outputs 

Delete the previous one create new one.

Do like this create an output variable array.string so that you can pass your data pill from step 2 to that action output variable.

Click on script step.

Next time you switch to the action output step. It's been ready & paas your script step output data pill to the action output.

Always keep the action output same as the script step output. That's the key concept here.

Publish the custom action.

In the flow designer as it is an array of string forsure you can iterate over it via for each loop.

 

Thanks

Sudhanshu

View solution in original post

3 REPLIES 3

Andrew Albury-D
Mega Guru

Hi Leonardo,

It looks like you may have not changed the Type of your final Action Output to the same (Array.String). At the very bottom of your first screenshot you can see it still says "variable" is String.

You may need to hit "Edit Outputs" up the top-right of the final Outputs screen, and select the correct type.

Otherwise, make sure you have published the latest version of your action for the flow to pick it up and have the correct inputs and outputs.

 

Hope this helps,

Andrew

Sudhanshu Talw1
Tera Guru

Hi leanardo,

Right now it is returning a string edit outputs 

Delete the previous one create new one.

Do like this create an output variable array.string so that you can pass your data pill from step 2 to that action output variable.

Click on script step.

Next time you switch to the action output step. It's been ready & paas your script step output data pill to the action output.

Always keep the action output same as the script step output. That's the key concept here.

Publish the custom action.

In the flow designer as it is an array of string forsure you can iterate over it via for each loop.

 

Thanks

Sudhanshu

Hitoshi Ozawa
Giga Sage
Giga Sage

Like Andrew said, in your custom Action Outputs, the variable type in String. You need to change that to Array.String. To change, click on the "Outputs" at the left hand side.

find_real_file.png

To change type in Outputs, you'll need to click on "Edit Outputs" first. Change type to Array.String and then "Save" and "Publish". Then retest your flow.

find_real_file.png

When Testing, if you haven't published the Action yet, it's really not necessary to Publish the Action.

To use unpublished custom Action in the flow,

1. open the flow

2. select the 3 vertical dots on the upper right side

3. select "Configuration"

find_real_file.png

4. Select "Show draft actions". Then unpublished custom Actions will also show up so you will be able to choose them.

find_real_file.png