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 / Excel get a row if key...
Power Automate
Answered

Excel get a row if key value is blank

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all, 

I'm wondering if there's a way to get a row if the key value is blank.

I've tried just leaving key value as blank but this doesn't work.

All help appreciated

Categories:
I have the same question (0)
  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Anonymous 

     

    Use compose action and supply expression-

    if(empty(items('Apply_to_each')?['Column Name']),1,items('Apply_to_each')?['Column Name'])
    here i am setting compose output 1 when excel column has blank value.
    Once you do that use condition action like- (Output of compose) is equal to 1 and put required action in Yes block.
    09-01.jpg
    Thanks
    Hardesh
     
  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Create a filter query action with key column equals to blank under the List rows present in a table action could filter out rows which key value is blank, for example:

    Annotation 2020-07-10 134434.jpg

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Hardesh15, I tried inputting your expression and this is the error message I'm getting.

    Any help would be appreciated.

    jcoughlan_0-1594370244413.png

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Anonymous 

     

    See my screen, in Compose 3 i have used Apply to each because i used action- List row present is a table. You are using Get a row action. this action give you only one row. I would suggest use List row present in a table so that you can get all empty rows.

     

    Thanks

    Hardesh

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Hardesh15 ,

    I appreciate your help, however it doesn't seem to be working.

    Any suggestions as to how I could go about fixing this.

    jcoughlan_0-1594629666339.png

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Anonymous 

    Requesting you please share whole flow screens and each expression(write in comment like i did ) so that i could see what is wrong in your flow.

     

    Thanks

    Hardesh

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    I really appreciate your help @Hardesh15 
    formula is: if(empty(items('Apply_to_each')?['Invoice Received']),1,items('Apply_to_each')?['Invoice Received'])
    It won't let me run or save the flow because of this error message: 

     

    'The template validation failed: 'The inputs of template action 'Compose_2' at line '1 and column '1686' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Compose_2' to be referenced by 'repeatItems' or 'items' functions.

     

    jcoughlan_0-1594637432359.png

    jcoughlan_1-1594637449332.png

     

  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Anonymous 

     

    Put compose 2 action inside Apply to each action. your compose 2 is outside the Apply to each Loop.

     

    Thanks

    Hardesh

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard