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 Platform Community / Forums / Power Automate / Check if Get Items Act...
Power Automate
Answered

Check if Get Items Action returns more than Zero Records using FLOW

(0) ShareShare
ReportReport
Posted on by

Hello all, 

 

Need support cause i'm stuck. 

 

I'm making a flow in power automate and I want to check if the "Get item by ID" has returned a record. 

I've used it a year ago and it worked, i just dont record how i've proceeded last time. 

 

I've tried length(body('Get Item by ID')?['value']) and length(outputs('Get Item by ID')?['body/value']).Error using length.png

 

I have the error :  Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'length' expects its parameter to be an array or a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#length for usage details.'.

 

Error using length 2.png

 

May Someone helps me please. 

 

I need a support ASAP. 

 

Thanks 

Categories:
  • Verified answer
    v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @RaphaelMG ,

     

     

    Could you please tell me:

    What is your flow trigger? 

    Get Item by ID returns a record, and there is no value field, so body('Get Item by ID')?['value'] returns null. 

    Please make sure you fill in the correct ID in Row ID. 

    You don't need to add a condition to judge, because if your Row ID is entered correctly, flow will return a record.

    I have made a test for your reference:

    1. I have a data source named Levi726Test. 

    vliweimsft_0-1658815660925.jpeg

     

     

    2. This is my flow. 

    vliweimsft_1-1658815660927.jpeg

     

     

    3. When I add a record to the data source, flow will return this record.

     

    vliweimsft_2-1658815660929.jpeg

     

     

    Best Regards,

    Levi

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard