cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bjdshp
Level: Powered On

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
Super User
Super User

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
Super User
Super User

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

bjdshp
Level: Powered On

Re: Checking if all subtasks are complete

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

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,271)