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

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

Array elements can only be selected using an integer index.

(0) ShareShare
ReportReport
Posted on by 1,754 Super User 2024 Season 1
 
I have this Apply to Each where i need to get the Length() of a sharepoint single line of text field:-
 
 
 
 
 
 
But I am getting this error:-
 
 
Unable to process template language expressions for action 'Condition_2' at line '0' and column '0': 'The template language expression 'length(outputs('Get_items_2')?['body/value']?['Project_x0020_name'])' cannot be evaluated because property 'Project_x0020_name' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.
 
 
 
although the "Project_x0020_name" is an accurate field inside the list.
 
 
 
 
 
 
Any advice?
 
 
 
 
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,029 Super User 2025 Season 2 on at
    Array elements can only be selected using an integer index.
    Hi,
     
    Small thing you have missed here- you are iterating through values dynamic content , and each element you are trying to iterate through is a list item which should be represented as items('Apply_to_each_2')?['Project_x0020_name']
     
    So correct expression to be used is length(items('Apply_to_each_2')?['Project_x0020_name'])
     
     
    Mark it as solution if it resolves your query !
     
    Thanks & Regards,
    Nived N
  • Suggested answer
    Mark Nanneman Profile Picture
    989 Super User 2025 Season 2 on at
    Array elements can only be selected using an integer index.
    First, I'd recommend just deleting your condition and replacing it with a filter.

    Use 
    outputs('Get_items_2')?['body/value']
    as the input to the filter, and use 
    length(item()?['body/value']?['Project_x0020_name'])
    as the first part of the filter and after the greater than operator  put "26"
     
    But yes, if you want to fix what you have follow use:

    'length(item()?['body/value']?['Project_x0020_name'])'

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard