Question

I am working on a microsoft flow where it is supposed to trigger email when the fields of a sharepoint list item -

  1. If 'Mail to be sent to Maths' is 'Yes' and 'IsmailsentMaths' is 'No' then trigger email to Maths Dep. 2.'Mail to be sent to Science' is 'Yes' and 'IsmailsentSci' is 'No' then trigger email to Sci Dep.

The two fields IsmailsentMaths and IsmailsentSci are hidden and are updated as "Yes"once the email is triggered.

When one of the field 'Mail to be sent to Maths' is 'Yes' then it triggers an email to Maths Dept which is perfect. After sometime I go back and update the same item and set 'Mail to be sent to Science' to 'Yes' then it triggers an email to Science Dept which is also perfect.

Problem: when the two fields are updated as "Yes" in one go then it triggers 3 emails. It triggers one of the two emails twice (either it triggers mail to Sci dept twice or mail to Maths Dept twice).

Is there any solution to this. Any assistance is appreciated. Thank you.

enter image description here

Était-ce utile?

La solution

Use below condition first in addition to above 2 conditions -

Mail to be sent to Maths == 'Yes' and Mail to be sent to Science == 'Yes' and IsmailsentMaths == 'No' and IsmailsentSci == 'No'

Implement Flow as shown below - enter image description here

Autres conseils

The conditional trigger of Microsoft Flow is not supported - the flow will get triggered based on the action we select - like on when the item is added or updated to the list, which means flow whenever an item is added or updated to list flow will get triggered. For your scenario, you can control that behavior inside the flow logic by adding additional branch or if condition.

Notes

  • The conditional triggered is very much needed in the PowerAutomate, Microsoft should implement this functionality - the similar logic we can handle in Nintex conditional start workflow.

The official answer from Microsoft PowerAutomate community:

Question: I want to Trigger flow Conditionally when item is modified. Has flow some Action like Nintex o trigger them conditionally?

Answer: "The short answer to your question is no - there is no action that fires only when a SharePoint item has been modified. I believe this has been suggested already in Flow Ideas - you may want to cast a vote in favor."

Microsoft Source:

I want to Trigger flow Conditionally when item is modified. Has flow some Action like Nintex o trigger them conditionally?

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top