cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SChavez
Frequent Visitor

Can a trigger condition contain a related table? OR navigating through apply to each condition limitations.

Hello. 

 

I am a rookie at Power Automate. 

 

Two questions: 

  • Can a trigger condition include a conditional check of related tables?
  • Is there an alternative way to achieve what I'm trying to do as defined below? 
    • My flow works beautifully unless there are no updates necessary after all checks have been completed (which, if I could skip the run from firing in the first place with all criteria met that would be ideal).

 

I have a flow tied to Dynamics 365. The flow does the following:

  1. Trigger on status update of opportunities - with a trigger condition of status = closed. (Only fires when an opportunity is updated to inactive)
  2. Lists the related tasks associated with the opportunity. 
  3. Then, in an Apply to Each step completes a condition check on task status = active. 
  4. If the closed opportunity contains open tasks the open tasks are updated with a review status reason. 
    • HOWEVER, if all tasks are closed on the closed opportunity the flow is failing, and I cannot add a terminate action to the conditional if no when contained in an Apply to Each step.  
      • Does it matter that the flow fails, considering at this point I don't actually need it to do anything? 

SChavez_0-1627342086652.png

 

Any insights are greatly appreciated. 

 

Thank you!

 

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @SChavez 

 

Can't you extend the List Related Tasks Filter rows to include Activity Status is 0 so that you don't need to check the IF condition? 

 

You mentioned "HOWEVER, if all tasks are closed on the closed opportunity the flow is failing". What error you getting?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

4 REPLIES 4
abm
Super User
Super User

Hi @SChavez 

 

Can't you extend the List Related Tasks Filter rows to include Activity Status is 0 so that you don't need to check the IF condition? 

 

You mentioned "HOWEVER, if all tasks are closed on the closed opportunity the flow is failing". What error you getting?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
SChavez
Frequent Visitor

@abm 

 

Thank you for the reply. That was actually my original hope. I'm sure my syntax was off, but I continued to get less than helpful errors when trying to expand the filter rows to include activity status. 

Hi @SChavez 

 

Extend the ODATA Query by adding the below:

 

and statecode eq 0

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
SChavez
Frequent Visitor

Thank you @abm. That was helpful. I think I was just overcomplicating it. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,057)