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

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (2,271)