Ashutosh B Bodake
Ashutosh B Bodake

Reputation: 1412

Power app Data table iteration.

I want to iterate through each row of the data table check for values and update the value in the newly created column.

Are there any blogs or tutorials which have described power app data table iteration and code syntax it.

Upvotes: -1

Views: 5737

Answers (2)

Seema_A
Seema_A

Reputation: 1

We can have a workaround for this.

  1. To iterate, use the ForAll function in PowerApps.
  2. Get the data table entries into a collection.
    1. Have an invisible gallery whose item property is set to your datatable.
    1. Have a button and set its OnSelect property as ClearCollect(yourcolname,gallery.allitems)
    1. Now you have your collection
    1. Use
ForAll(yourcolname,Patch(destinationtable,Defaults(destinationtable),{columntoupdate:yourcolfieldname.value}))

Hope this solves the issue!

Upvotes: -1

Adrian Orth
Adrian Orth

Reputation: 49

Currently there's no way to iterate the items in a DataTable. You can, however, pull the data into a collection and iterate the collection using ForAll function. Then display the collection in a DataTable.

You can also create a new issue in the PowerApps Ideas Board to make a suggestion to the product team to add this to the DataTable control.

Upvotes: 0

Related Questions