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 Platform Community / Forums / Power Automate / Array elements can on...
Power Automate
Unanswered

Array elements can only be selected using an integer index.

(0) ShareShare
ReportReport
Posted on by 1,803 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?
 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 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
    991 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

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard