cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Invalid Template Error

Hi, I am creating the following flow and at step "Add Rows into Table" I am getting the following error message.

 

"InvalidTemplate. Unable to process template language expressions in action 'Add_a_row_into_a_table' inputs at line '1' and column '2768': 'The template language expression 'split(items('Apply_to_each_4'),',')[1]' cannot be evaluated because array index '1' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'" 

 

I am not sure what that means or how to fix it. See attachments below Highway User Notification pt1.PNGHighway User Notification pt2.PNGHighway User Formula.PNG

 

 

4 REPLIES 4
Highlighted
Super User II
Super User II

HI @Anonymous 

 

The error is indicating that the split returns an array with only one item. Since you're trying to access the second item by doing [1], it fails. 

 

Also, you're doing the split on the "Apply To Each." This is strange. Are you sure you want this?

I think what you want to do instead is to do the "split" of a specific field. For example, if you have an array that contains "Title" and "Description", you do an "Apply to each" on that array and then do the split on the Title.

 

Does this make sense?

 

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

Highlighted
Anonymous
Not applicable

I changed the array index and now I am getting a "Bad Request" error on my excel: delete row "step 6"

Highlighted

HI @Anonymous 

But that's something different. Can you please print the error so that I can try to check what may be wrong?

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

Highlighted
Anonymous
Not applicable

highwayuser.PNG

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (7,360)