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

Checking if all subtasks are complete

I need something similar to this where it checks to see if a record exists.

 

https://powerusers.microsoft.com/t5/General-Discussion/Checking-to-see-if-a-Record-exists-if-it-does...

 

I have a situation where multiple people are assigned subtasks to a major task, and it can't be marked approved until all people have performed the task.  

 

Here is what I am using.

 

If(LookUp(Filter(MOC_Approvals,vID.ID='MOC ID'),Status="Approved",true)<>true,UpdateContext({vSuperCheck:false}),UpdateContext({vSuperCheck:true}));

 

The problem I realized this morning is that lookup will return a true on the first item marked approved, but I need it do something like a ForAll.  Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: Checking if all subtasks are complete

Hello,

If(
!LookUp(Filter(MOC_Approvals,vID.ID='MOC ID'),!(Status="Approved"),true),
UpdateContext({vSuperCheck:false}),UpdateContext({vSuperCheck:true}));

Can you try the formula above?
It checks if there is a record that its status is not approved. If it exists does nothing. If it doesn't find any records that status is not approved means that all are approved 🙂
Hope it works

View solution in original post

2 REPLIES 2
Highlighted
Solution Sage
Solution Sage

Re: Checking if all subtasks are complete

Hello,

If(
!LookUp(Filter(MOC_Approvals,vID.ID='MOC ID'),!(Status="Approved"),true),
UpdateContext({vSuperCheck:false}),UpdateContext({vSuperCheck:true}));

Can you try the formula above?
It checks if there is a record that its status is not approved. If it exists does nothing. If it doesn't find any records that status is not approved means that all are approved 🙂
Hope it works

View solution in original post

Highlighted
Frequent Visitor

Re: Checking if all subtasks are complete

Thanks for pointing out the obvious!  That worked, I appreciate the help.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,184)