web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Workaround for no dela...
Power Apps
Answered

Workaround for no delay to delay a second ForAll loop

(0) ShareShare
ReportReport
Posted on by

Hi All,

I see there is no way to delay code from firing off without the use of a timer.

 

I have a button that patches 2 different lists where the second forall loop needs to wait for the first to complete.

 

I pull the data into a gallery from a "default" list with "UserEmailAddress", "location" and "percentage"

the user can make changes to any of the defaults and if the gallery is at 100 percent the submit button appears and they can submit their allocation.

 

The first ForAll loop Patches all changed items to the default list

The second patches the submission list from the defaults that were supposedly just saved.  (NO I can't add a save button that will save the Defaults then enable to the submit button. That would be too many clicks for my delicate users fingers 🙂 )

 

The issue is the second loop is pulling the defaults prior to all being saved causing the 2 to be out of sync.  I have been searching for a way to delay the second loop from firing off, but it does not look like there is a way.

 

I am trying to setup an If() for the second loop to sum() the defaults and make sure they are at 100, if not check again, to send it into a loop until the defaults are at 100.

I am getting a delegation issue with the below, and this list will get way over 2000 rows.

If(Sum(Filter(EmployeeDefaultTimeAllocations,VarUserID = EmployeeEmailAddress ),Percentage)<>100,Select(BTN_SubmitEditGal),

I do not get the delegation warning when I filter my gallery on the same filter, seems to be something about the Sum(). 

Not sure if selecting the button again will work, I am trying to send this into a loop till we are at 100

 

TIA,

Joe

Categories:
  • Verified answer
    joef Profile Picture
    on at

    I had to add a save button and a timer, I couldn't get around the delegation.

     

    "Onselect" of Save button  select(timer1), 

    "On timer end" I set a variable to enable my submit button.

    Set the duration to 10000 (1 sec), and the time it takes for the submit button to become active all is saved, I tried with up to 10 changes before I hit save...

     

    All good I will have to apologize to my users when their finger hurts from 2 clicks instead of 1 🙂

     

    Joe

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard