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 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
manuelstgomes
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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,307)