有没有办法将 collection 中的数据值组合成一个字符串?

Is there a way to combine data values from collection into a single string?

我已经尝试将我的 collection 修补到 SP 列表。但是,它会为我的 collection 中的每一行创建新项目。我想要实现的是合并来自 collection 的所有数据并将其作为单个条目插入到 Sharepoint 中。

我创建了一个按钮,用于将数据从 collection 修补到 SharePoint。

ForAll(RemedialCollection,Patch(CAF,Defaults(CAF),{Title:title_datavalue.Text, RemedialAction:RemedialAct,RemedialActionDetails:RemDetails}))

但是,此函数每行创建新项目。例如在我的 collections 中我有 3 个条目,当我修补它时,我将在 SP 中有 3 个新条目。是否可以将这 3 个条目合并为 1 个条目?

也许你可以先用Concat function to combine the same fields of the entries, then use Patch to patch the data into SharePoint. However Concat creates strings so it may not match the data type for all your SharePoint fields. There is a PowerApps discussion where someone uses Concat to combine records to speed up the Patch function

您还可以查看有关 combining records inside of a collection 的讨论。

听起来您想将整个 table 修补到一个字段。

如 drvela 所建议的那样,您可能需要将内容连接成一个可以保存的字符串。

也就是说,我不建议将 table 的数据保存到一个字段中。字段对它们可以包含的字符数有限制,并且当您尝试以这种方式保存数据时,数据无法按列搜索。

相反,您可能想要了解的更多信息是建立 table 之间的关系。这样,您的 CAF table 可以为每个补救措施包含一个 ID 号。另一个 table 可以为已采取的每个补救措施引用该 ID。这是 1:many 关系的示例:1 个补救 ID 到许多补救操作。