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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,586)