cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SeanGlasspool
Regular Visitor

Building a condition that checks for an attachment from a form.

Hello!

 

Ive been using Flows for a while to Automate some basic tasks, and as I get more into it, the more I want to do! They are quite addictive, and can blow away a few hours figuring stuff out. (For the longer gains)

 

So I have a Microsoft Form, staff complete to order stock.

 

The flows are simple.

 

I check if the length of an attachment is greater than 0 if so, send email with attachment, if no then send email without attachment.

SeanGlasspool_1-1669686463715.png

 

SeanGlasspool_0-1669686417984.png

 

No matter how I set up the logic, the condition is always true.

Not sure where I am missing a trick.

 

Many thanks in advance.

 

 

6 REPLIES 6
v-liwei-msft
Community Support
Community Support

Hi @SeanGlasspool 

 

Using the length function is correct.
The problem is your reference to the attachment field, you can see the correct reference method of the attachment field in the dynamic content.

vliweimsft_0-1669700757103.png

 

Best Regards,

Levi

grantjenkins
Community Champion
Community Champion

I think you have your Condition slightly incorrect. I'm assuming you want to check if it's either one of the first two conditions AND the last condition. At the moment they are all OR. See example below:

 

grantjenkins_0-1669729670055.png

 



----------------------------------------------------------------------

If I've answered your question, please mark the post as Solved.

If you like my response, please consider giving it a Thumbs Up.

Aaaah! Penny drops. thanks!

 

 

Excellent tip. thank you!

SeanGlasspool
Regular Visitor

Finally - how do I prevent the logic cascading through my conditions and sending emails to all my (in this case) false conditions:

 

SeanGlasspool_0-1670188910076.png

 My Thoughts might be to add a Terminate at the end of each email?

 

v-liwei-msft
Community Support
Community Support

Hi @SeanGlasspool 

 

We really understand that you have more than one issue need to be solved today and we are surely happy to help you with those, but to better focus on the new problem and ensure the service quality, we would advise you to create another ticket on the issue.

It can also help us to get the case better recorded and let Microsoft know what you have been through clearly. Thank you so much for your understanding. 

 

Best Regards,

Levi

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,776)