cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
notj
Level 8

Confused by results of "length"

I was trying to use length on an array variable to get a count of how many items were in it, but it's resulting in a download link which then just gives me a JSON of the results. 

 

I was taking the rows from a table, using a for each to append to an array variable, counting the variable, then doing a union to itself in an attempt to only have unique values, then counting it again to make sure the number is different. 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Confused by results of "length"

 

Hi @notj ,

 

You should do like this:

186.PNG

 

Best Regards,

Community Support Team _ Barry
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

5 REPLIES 5
Super User
Super User

Re: Confused by results of "length"

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

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!

notj
Level 8

Re: Confused by results of "length"

Sure @Brad_Groux , here. Like I said, I was thinking Length would return a count of the items in the variable. It does not. How can I do that?

 

2019-12-17 11_19_50-Edit your flow _ Microsoft Power Automate.png2019-12-17 11_20_24-Run History _ Microsoft Power Automate.png

PowerBack19
Level 8

Re: Confused by results of "length"

It looks like your Compose step with the "length" was not input using the Expression field. I would suggest clicking on the field and then click on the "Expression" tab. Then use the "length" expression and add it that way. 

Dual Super User
Dual Super User

Re: Confused by results of "length"

Hi!
Totally agree with @PowerBack19.
This official post includes all detailed steps to add an expression:
https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/
Hope this helps


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Community Support Team
Community Support Team

Re: Confused by results of "length"

 

Hi @notj ,

 

You should do like this:

186.PNG

 

Best Regards,

Community Support Team _ Barry
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

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,363)