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 : jNcjID/VVtG5I3X88Gy79v
Power Automate - Building Flows
Unanswered

Getting the row count of 'Get rows' action suddenly started failing

Like (0) ShareShare
ReportReport
Posted on 13 Nov 2022 00:19:27 by 49

Hi, I am using a 'Get rows' action in my flow. All I am trying to do is get the count of the rows returned.

 

I have a 'Compose' action directly after that has the expression

length(body('Get_rows')?['value'])
 
This expression has been working for months and is all of a sudden failing. I am getting the error message:
The template language function 'length' expects its parameter to be an array or a string. The provided value is of type 'Null'.
 
I then tried changing the expression to be:
length(outputs('Get_rows')?['body/value']) but I am encountering the same issue.
 
Any ideas?
 
David59740_0-1668298750666.png

 

I have the same question (0)
  • David59740 Profile Picture
    49 on 24 Nov 2022 at 04:43:08
    Re: Getting the row count of 'Get rows' action suddenly started failing

    I deleted action and remade it with the exact same logic and it works now. Thank you for the response, that is a valid answer if the flow wasn't corrupt or whatever happened.

  • grantjenkins Profile Picture
    11,059 Moderator on 13 Nov 2022 at 01:47:01
    Re: Getting the row count of 'Get rows' action suddenly started failing

    Your expression looks completely fine:

    length(outputs('Get_rows')?['body/value'])

     

    Can you have a look at the output from your Get rows action, or if you can't see it there, add a Compose with the following expression to see what output you get.

    outputs('Get_rows')?['body/value']

     

    If it doesn't have a value object (it should but seems like it's not including it if no rows) then you can try the following:

    if(empty(outputs('Get_rows')?['body/value']), 0, length(outputs('Get_rows')?['body/value']))

     

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…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2