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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Problems testing for e...
Power Automate
Unanswered

Problems testing for empty result from Excel - List Rows present

(0) ShareShare
ReportReport
Posted on by

I am trying to write a simple flow which looks to see if a row containing a key item exists, and if not I will add a new row.

 

I wrote an Odata filter in List Rows Present to search on the incoming key data. If the key value is not found, I get an empty body from List Rows Present. I have tried creating a Condition to test for Null in tons of ways:

equals(triggerbody(), null) = true

trigger() = null

triggerFormDataValue('value') = null

and *many* other variations. 

 

Any suggestions would be greatly appreciated!

 

Capture.PNG

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at

     

    Hi @Anonymous ,

     

    You could use length() function to get numbers of the filtered rows.

    Expression reference:

    length(body('List_rows_present_in_a_table')?['value'])

    Image reference:

    115.PNG

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    on at

    Thank you, this was very close! Because length() wanted a string, I used the following:

     

    length(string(body('List_rows_present_in_a_table')?['value']))
     
    And, since Body contained "value: []" the returned length was 2, presumably for the square brackets.
    So, I modified the Condition to compare the above length string equal to 2 and it works!
  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    Hi @Anonymous ,

     

    If it is an array, you can also use length() to determine the number of array elements. The current Body returns an empty array, so we can use the method I provided directly.

    10.PNG11.PNG

     

    Best Regards,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard