cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Count items in array

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
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @demondan,

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.

 

 

View solution in original post

6 REPLIES 6
Super User III
Super User III

Hi @demondan ,

 

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



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Community Support
Community Support

Hi @demondan,

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.

 

 

View solution in original post

Hi

What does compose do?

 

Thanks

Dan

Hi @demondan,

 

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.

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

@demondan 

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-

 

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,981)