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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Count items in array

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I have exported a sharepoint list into an array variable (and stripped away the data im not interested in) resulting in the following items:

 

{"Title": "Dan"},{"Title": "John"},{"Title": "Rich"}
 
How do I count the number of items? So in this example will be 3? I've tried length('arrayNam') and this returns an incorrect value?
 
thanks
Dan
Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous ,

     

    Try length(variables('arrayNam')?['value'])

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

     

    Thanks

  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    I have tried on my side that use length(variable('arrayNam')), and it return value 3.

    Please make sure your Array format and the expression are correct.

    Annotation 2019-08-21 134923.png

    Annotation 2019-08-21 134907.png

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi

    What does compose do?

     

    Thanks

    Dan

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    I input length(variable('arrayNam')).

    Annotation 2019-08-21 171349.png

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi

    So the array I have I exactly extracted it from a sharepoint list.  I am thinking the format is possibly not correct, is there a way to just display the format of the array when i run the flow?  Like a print to screen or a log/console?

     

    thanks

    dan

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @Anonymous 

    Hey there.  So, you may have already seen this...but if you go to the main page for your Flow, you can see all of the past runs.  If you click on any one of those, you can then click on each step and see the input and output for each.

     

    Not sure if that gets you where you want to go, but hopefully it sets you on the right track.

     

    -Ed-

     

  • tomlis Profile Picture
    34 on at

    It should be length(variables('arrayNam'))

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 639

#2
Valantis Profile Picture

Valantis 392

#3
11manish Profile Picture

11manish 350

Last 30 days Overall leaderboard