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

Sharepoint list item update - has attachment check

I have an issue with email notifications about Sharepoint item edits.

I want following scenarios:

 

 

  1. item is edited and has an attachment - send me a notification version 1
  2. item is edited and has no attachment - send me a notification version 2
  3. item is edited and another attachment is uploaded next to previously uploaded one - send me a notification version 1

 

Currently I receive both notifications about any change inside the item.
In both versions I use this expression to check if the item has attachment:

equals(triggerBody()?['HasAttachment'],bool('True'))
 
Any idea how to set it up?
1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @xsomej ,

 

You could determine the notification version directly by judging whether Has attachment is equal to true.

You could also consider whether Created is equal to Modified to determine whether the current Flow is triggered because the item is updated.

In addition, in the third case, if you want to monitor whether the current item is updated because it adds additional attachments, it is currently not possible.

There is no way for an existing trigger to monitor whether a specified field has been updated.

One alternative for you could be checking if the number of attachments is expected, as below:

33.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

Hi @xsomej ,

 

You could determine the notification version directly by judging whether Has attachment is equal to true.

You could also consider whether Created is equal to Modified to determine whether the current Flow is triggered because the item is updated.

In addition, in the third case, if you want to monitor whether the current item is updated because it adds additional attachments, it is currently not possible.

There is no way for an existing trigger to monitor whether a specified field has been updated.

One alternative for you could be checking if the number of attachments is expected, as below:

33.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

Hi Barry,

 

thanks for that idea, I tried it and it works fine.

Helpful resources

Announcements
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

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (29,654)