cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deltaformtech
Helper I
Helper I

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
manuelstgomes
Super User
Super User

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
manuelstgomes
Super User
Super User

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,403)