Power Apps:Patch函数添加人员或组列的项
Power Apps中,Patch
函数用于创建或更新数据源中的记录。
创建新记录
Patch(DataSource,Defaults(DataSource),{Field1: Value1,Field2: Value2,...}
)
更新现有记录
Patch(DataSource,Lookup(DataSource, ID = RecordID),{Field1: NewValue1,Field2: NewValue2,...}
)
对于列表中的文本、日期和数字列,赋值比较简单,但人员或组列,需要填写更多的量
Patch('People- Area- Role List',Defaults('People- Area- Role List'),{People: {Claims: "i:0#.f|membership|" & Lower(_User.Mail),Department: "",JobTitle: "",DisplayName: _User.DisplayName,Email: _User.Mail,Picture: ""}})