cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deltaformtech
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
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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (52,418)