简体   繁体   English

如何使用 PowerApps 更新两个 SP 列表项

[英]How to update two SP list items using PowerApps

We would like to connect 2 Sharepoint lists to one PowerApps gallery.我们想将 2 个 Sharepoint 列表连接到一个 PowerApps 库。 So editing in in Form 1 with SP list 1, and then editing in Form 2 with SP list 2. The Title column in List 1 and List 2 are the same.所以用SP list 1在Form 1中编辑,然后用SP list 2在Form 2中编辑。List 1和List 2中的Title列是一样的。

The gallery list is showing "Gallery.Selected" the filter is:图库列表显示“Gallery.Selected”,过滤器为:

SortByColumns(
  Filter(
    [@BICT_DATA_KLANTEN_MAIN]; 
    StartsWith(
      Title; 
      ZOEKBALK_BICT_DATA_MAIN.Text
    )
  ); 
  "Title"; 
  If(
    SortDescending1; 
    Descending; 
    Ascending
  )
)

Its difficult for me to answer this question succinctly.我很难简洁地回答这个问题。 There are SO many factors at play.有很多因素在起作用。 To connect two Sharepoint lists to a single Gallery control, combine the lists into a single Collection.要将两个 Sharepoint 列表连接到一个库控件,请将这些列表合并到一个集合中。

Example:例子:

ClearCollect(colCombined,
    SPList1,
    SPList2
)
  • Add colCombined to the Items property of the Gallery.colCombined添加到 Gallery 的Items属性中。
  • But this will add ALL records from both SP Lists.但这将添加两个 SP 列表中的所有记录。
  • You likely don't want this because of unnecessary columns, size of data, etc.由于不必要的列、数据大小等,您可能不希望这样做。

Considering the Form controls you mentioned, put some thought into the relationships between List1 and List2.考虑到您提到的表单控件,请考虑一下 List1 和 List2 之间的关系。 I'm imagining you want a Header - Details -type of relationship.我想象你想要一个Header - Details - 类型的关系。

  • Personally, I remove the Title column from Sharepoint lists then use a recordGUID column.就个人而言,我从 Sharepoint 列表中删除Title列,然后使用recordGUID列。 Its more intuitive for me and others that come after me to maintain the app.对于我和其他追随我来维护应用程序的人来说,它更直观。 "Title" says nothing about "ID key needed to relate lists". “标题”没有提及“关联列表所需的 ID 密钥”。
  • Research the PowerApps GUID() function.研究 PowerApps GUID()函数。 You'll want to populate the recordGUID column of both lists when creating new records.在创建新记录时,您需要填充两个列表的recordGUID列。
  • There is a 1-2hr class worth of nuance involved in creating a Header/Details type of application.创建Header/Details类型的应用程序涉及 1-2 小时的细微差别。 From the UI to the Sharepoint best practices to the PowerFX code.从 UI 到 Sharepoint 最佳实践再到 PowerFX 代码。

Maybe useful for you...也许对你有用... 在此处输入图像描述

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM