cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SChavez
Regular 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 blogPower 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 blogPower Automate Video Tutorials

View solution in original post

SChavez
Regular 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 blogPower Automate Video Tutorials
SChavez
Regular Visitor

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,617)