cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Issue with using @split function to create an array

Hi,

I'm having issues with passing a collection of images from PowerApps to Flow and splitting a large string into an array. I receive the following error:

ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@outputs('ProcessImages')' is of type 'String'. The result must be a valid array.
 
Here are images of my Flow:
Screen Shot 2019-12-16 at 7.12.48 AM.pngScreen Shot 2019-12-16 at 7.14.49 AM.pngScreen Shot 2019-12-16 at 7.15.55 AM.png
1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Hey @deltaformtech 

 

Your formula is correct but you're putting it as a string and not an actual formula. Hence the message. Power Automation gets the string of the formula instead of the result of it. You don't need the " in the formula.

 

Please include it here:

2019-12-16 14_25_39-Create your flow _ Microsoft Power Automate.png

 

Makes sense?

 

If you need further assistance please let me know

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

9 REPLIES 9
Super User II
Super User II

Hey @deltaformtech 

 

Your formula is correct but you're putting it as a string and not an actual formula. Hence the message. Power Automation gets the string of the formula instead of the result of it. You don't need the " in the formula.

 

Please include it here:

2019-12-16 14_25_39-Create your flow _ Microsoft Power Automate.png

 

Makes sense?

 

If you need further assistance please let me know

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

View solution in original post

Hi Manuel,

 

You're response makes sense, however, I am still experiencing an issue.

 

When I attempt to input the formula: @split(triggerBody()['ProcessImages_Inputs'],#) into the Expression box, I see the following:

Screen Shot 2019-12-16 at 7.35.34 AM.png

Am I still missing something?


Greg

Hi @deltaformtech 

 

In the formula put "#" instead of just #

 

It will work with that.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

@manuelstgomes 

Did you mean to say to put single quotes around the # :

'#'

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Yep single quotes indeed!!!!! Thanks @ScottShearer 

@deltaformtech  does it work for you?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Hi @manuelstgomes , @ScottShearer ,

 

I enter @split(triggerBody()['ProcessImages_Inputs'],'#')

into the expression box and still receive the "The expression is invalid" message.  Thoughts?

HI @deltaformtech 

 

When inserting in the formula remove the @.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Hi @manuelstgomes ,

 

😅Thank you!! That did the trick!

Hi @deltaformtech 

 

AWESOME!!!!!!!!!! Glad to hear it.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (3,773)