cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jcoughlan
Helper I
Helper I

Excel get a row if key value is blank

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

2 ACCEPTED SOLUTIONS

Accepted Solutions
Hardesh15
Super User II
Super User II

@jcoughlan 

 

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
 

View solution in original post

@jcoughlan 

 

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

 

Thanks

Hardesh

View solution in original post

8 REPLIES 8
Hardesh15
Super User II
Super User II

@jcoughlan 

 

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
 

View solution in original post

v-litu-msft
Community Support
Community Support

Hi @jcoughlan,

 

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.

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

Any help would be appreciated.

jcoughlan_0-1594370244413.png

 

@jcoughlan 

 

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

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

 

@jcoughlan 

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

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

 

@jcoughlan 

 

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

 

Thanks

Hardesh

View solution in original post

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (31,226)