0

I have a Power Automate flow that takes in an excel file with a table of data. My objective is to get each row of data from excel, and add it to a row in a dataverse table I have already created.

My flow is as follows:

enter image description here

When the flow is executed it fails here and I am pretty sure it has to do with how I am trying to retrieve the values from the array of data that is returned from the first loop:

enter image description here

These are the values returned to me from the list rows present in a table action:

enter image description here

And this is how I am trying to retrieve them:

enter image description here

I know how I am trying to get each value is what is causing it to fail, but how would I fix this?

1 Answer 1

0

See: https://www.powertechtips.com/loop-through-array-power-automate/

And: https://powerusers.microsoft.com/t5/Building-Flows/While-using-array-variable-got-The-template-language-expression/td-p/452395

The error usually happens when you're trying to access an element at an index that is greater than the length of the array. To debug further you can add a Compose action inside your Apply to each loop to output the current item of the array.

Ref: https://www.youtube.com/watch?v=Kupz71dWYyY

3
  • I cannot access the current item inside the apply to each loop for some reason Commented Jan 10, 2024 at 17:24
  • Take a look at this and see if you are accessing it the right way: powertechtips.com/loop-through-array-power-automate Commented Jan 10, 2024 at 17:26
  • Nice, I updated my comment with the link, please accept the solution. Commented Jan 10, 2024 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.