cancel
Showing results for 
Search instead for 
Did you mean: 

Better and more robust looping functions

From what I can tell, practically anything that performs looping functionality (mainly ForAll) wants to return a table. This means that the actions that are performed inside of the loop need to be returning values that it can then build its table with.

 

My current situation, and one that I believe is probably pretty common, requires me to loop through a collection and perform actions for each iteration without returning any values. Unfortunately, the obvious choice to use ForAll doesn't work since the first action I need to do is set a temporary variable (using either Set or UpdateContext) which it doesn't accept.

 

What I propose is that some proper/basic looping functionality is added that doesn't require any return values and has no bias on the type of actions performed inside. We need some options that don't require a hacky combination of 3+ functions that simply allow us to iterate over data. Loops such as For, ForEach(x in x_collect), Do-While, etc.

Status: Under Review

Updating status and adding @GregLi

Comments
Anonymous
Not applicable

Addition of loop is a good idea.

 

When Microsoft is going to add this feature.

PowerApps Staff
Status changed to: Under Review

Updating status and adding @GregLi

Level: Powered On

This is a much needed feature.

Without the ability to loop through a data set (collection, list box, data connection, etc...) Powerapps is severly limited.  Anyone with development experience uses looping techniques.

 

We need to update records in a database or collection based on a collection of selected items.  ForAll does not work for this.  We need While, ForEach, etc...

Thank you

Ron