1

Short Version

Is there a way to update a single field in a collection/data source for all rows that meet a certain categorical criteria?

Background and Goal

I'm currently using PowerApps (SharePoint source) to maintain an inventory list for employees to locate items stored in bins. App is working great, but the next step is to give the users the ability to move all the items from one bin into another bin, ideally in a single scan. My theory being that you should be able to scan both bins, storing the details in separate text inputs or variables, and then patch all the items filtered to bin 1 with a new bin number, bin 2.

What I've Tried

I was able to patch a single item in a collection with this code: (don't mind the column name, I used D&D terms for my Sandbox testing grounds)

Patch(SandBoxList,First(Filter(SandBoxList,'Character Name' = "Juan Carlos")),{Class: Search_TextInput.Text})

I also tried to do the following, but ForAll() doesn't seem to play well with Patch() as Patch() wants to interact with a single record at a time:

ForAll(TestCollection,If(Class = "Monk",Patch(TestCollection,{Subclass:"None"},{Subclass: "Potato"})

4

1 回答 1

0

万一其他人遇到这种情况,我发现了一个 YouTube 视频,详细说明了我正在尝试做的事情:

https://www.youtube.com/watch?v=0xZ4fMJbLvk

它很长,但它将引导您完成变量的创建以及如何基于过滤器进行迭代。

于 2019-12-30T16:34:18.660 回答