web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / The execution of templ...
Power Automate
Answered

The execution of template action 'Select' failed cannot be evaluated because array index '1' is outside bounds (0, 0) of array

(0) ShareShare
ReportReport
Posted on by 8

I'm running across this error

The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{ "Title": "@item()['Title']", "Email": "@item()['Email']", "First and Last Name": "@trim(concat(split(item()?['Title'], ',')[1], ' ', split(item()?['Title'], ',')[0]))", "User Principal Name": "@item()['UserPrincipalName']" }' failed: 'The template language expression 'trim(concat(split(item()?['Title'], ',')[1], ' ', split(item()?['Title'], ',')[0]))' cannot be evaluated because array index '1' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'.

I did not write the original code so I'm trying to figure out why it is failing.  Any and all advice is appreciated.

Categories:
I have the same question (0)
  • Verified answer
    v-yueyun-msft Profile Picture
    on at

    Hi , @Cmundy 

    This error code due to your  "split(item()?['Title'], ',')[1]" code .

    This may happen when your Title do not have the ',' character.

    So you need to use the "split(item()?['Title'], ',')?[1]" , so if the Title do not have the ',' character, it will return blank in your side .

     

    Best Regards,

    Yueyun Zhang

  • Cmundy Profile Picture
    8 on at

    So I looked at the raw input and for the title input this is what I'm receiving:

     

     "Title""Archer, Amy A",
     
    It has the ',' inside of the title.  So I'm not sure why it would be giving me the error.  I can make the changes you recommended and see if it remedies the situation.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard