简体   繁体   English

使用带有 Patch() 的 onSelect 按钮更新外键共享点列表 - PowerApps

[英]Update ForeignKey Sharepoint List using onSelect button with Patch() - PowerApps

My problem is what I describe in the title.我的问题是我在标题中所描述的。 I want to update a foreign key on my sharepoint list with a button.我想用一个按钮更新我的共享点列表上的外键。

I have two List with OneToMany relation:我有两个单对多关系列表:

User{ ID, Name, Surname}
Book{ID, Title, Author, ID_User}

When I go one user, with a gallery, i can see the book related with a Filter:当我去一个用户的画廊时,我可以看到与过滤器相关的书:

Filter(Book,BrowseGallery1.Selected.ID = ThisRecord.IDUser.Id)

In this gallery i want to add a Trash and when i click the button remove the Book of this User, soo i want to remove the relation and see only the book related with this user.在这个库中,我想添加一个垃圾箱,当我单击按钮删除此用户的书时,我想删除关系并仅查看与此用户相关的书。

I try with:我尝试:

Patch(ThisItem, First( Filter(Book, BrowseGallery1.Selected.ID = ThisRecord.IDAnagrafica.Id)), { ID_User:  0} )

But give me an error.但是给我一个错误。 I try this patch with other columns like {Title: "TEST"} and it work.我将这个补丁与其他列(如 {Title: "TEST"} 一起尝试)并且它有效。

Patch(ThisItem, First( Filter(Book, BrowseGallery1.Selected.ID = ThisRecord.IDAnagrafica.Id)), { ID_User:  ""HERE WHAT I NEED TO SET""} )

Thx for help谢谢帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 PowerApps 中的下拉列表修补 SharePoint 列表中的列 - Patch Columns in a SharePoint List using Dropdown in PowerApps 使用 PowerApps 如何批量更新 SharePoint 列表中 1% 到 10% 的记录,总共有 20k+ 条记录 - using PowerApps how to mass update 1% to 10% records in SharePoint list that has 20k+ records in total 如果使用Powerapps作为共享点列表,单击按钮时字段为空,则在字段名称附近显示星号(*) - Display asterisk(*) near field name if fields are empty on Button click using Powerapps for sharepoint list 如何使用 PowerApps 更新两个 SP 列表项 - How to update two SP list items using PowerApps 在PowerApps / Sharepoint列表中拆分和连接字符串 - Split and concatenate strings in PowerApps / Sharepoint List Powerapps如何选择提交到SharePoint列表的字段 - Powerapps how to choose fields that are submitted to SharePoint list PowerApps 中的集合导出到 Sharepoint 列表问题 - Collection export to Sharepoint list problem in PowerApps 使用SPServices更新SharePoint列表 - Using SPServices to update SharePoint List PowerApps:从 Sharepoint 查找列表中提取特定记录以使用显示表单显示其他字段 - PowerApps: Pull a specific record from a Sharepoint Lookup list to show additional fields using a Display Form 使用 powerapps 将元素从列表移动到共享点中的另一个列表 - Move element from list to another list in sharepoint with powerapps
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM