cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
d-c
Regular Visitor

Flow that checks for empty cells within an excel table

I have a flow that submits forms once they are completed to a table in a shared Excel sheet where each question gets it's own column of cells for answers to be added to. Now I'm trying to make a flow that checks for empty cells in certain columns and sends an email saying that a response needs to be submitted. Below are some screenshots of how I am trying to do this but no matter what it always evaulates to true.Screen Shot 2019-01-17 at 11.37.58 AM.pngScreen Shot 2019-01-17 at 11.38.17 AM.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @d-c,

 

Thanks for updating.

As you are using Excel Online (Business), please consider using the action List rows present in a table to get all the rows.

I have made another test for your scenario.

Under the button trigger, initialize a variable of type Array. Named it as ForBlank.

Add the action List rows present in a table to get all the rows.

Add an action Filter array to filter out all the rows with empty value in certain field:

@equals(empty(item()?['date']), bool('True'))

Add an Apply to each, select output Body from Filter array action, add action Append to array within the apply to each, set its value with the following code:

item()?['name']

Under the Apply to each, add a Condition with the following code to check if the variable is empty or not:

@not(empty(variables('ForBlank')))

Under if yes branch, add a Compose action with the following code:

join(variables('ForBlank'),' ,')

Then send an email with the compose output in the email body.

Under If no branch, send me a mobile notification with Completed in the text field.

Please take it for a reference and try with it on your side.

1.PNG2.PNG3.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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
v-yamao-msft
Community Support
Community Support

Hi @d-c,

 

Do you want to check whether a field is empty or not?

It seems that you are using action Get tables, please take a try with the action Get rows.

I have made the following test which is working fine.

The function in the Condition is:

@equals(empty(items('Apply_to_each')?['Category']), bool('True'))

An image for your reference:

1.PNG

Please feel free post back if you need more help.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yamao-msft I am using Excel for business, which does not have the option of "Get rows" is there a workaround for this? Also since I have multiple values per row this flow seems to send an email for each empty cell in that row. For instance the third row in my Excel sheet has 3 empty cells so I get 3 emails saying the column is empty. 

d-c
Regular Visitor

@v-yamao-msft  This is the error that I get when attempting to use "Get rows" but it doens't appear to be working because there is a business account in use. Screen Shot 2019-01-22 at 12.42.01 PM.png

v-yamao-msft
Community Support
Community Support

Hi @d-c,

 

Thanks for updating.

As you are using Excel Online (Business), please consider using the action List rows present in a table to get all the rows.

I have made another test for your scenario.

Under the button trigger, initialize a variable of type Array. Named it as ForBlank.

Add the action List rows present in a table to get all the rows.

Add an action Filter array to filter out all the rows with empty value in certain field:

@equals(empty(item()?['date']), bool('True'))

Add an Apply to each, select output Body from Filter array action, add action Append to array within the apply to each, set its value with the following code:

item()?['name']

Under the Apply to each, add a Condition with the following code to check if the variable is empty or not:

@not(empty(variables('ForBlank')))

Under if yes branch, add a Compose action with the following code:

join(variables('ForBlank'),' ,')

Then send an email with the compose output in the email body.

Under If no branch, send me a mobile notification with Completed in the text field.

Please take it for a reference and try with it on your side.

1.PNG2.PNG3.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, I am trying to figure this out too. @v-yamao-msft  I tried your solution but it doesn't work for me - I get a no/mobile notification for every row in the sheet. I think since you posted your response, MS no longer allows us to enter advanced code for Conditions so I changed:

@not(empty(variables('ForBlank')))

to:

empty(variables('ForBlank')) - is equal to - true

 

Do you have any suggestions?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,274)