简体   繁体   English

一起编辑多个共享点站点列表

[英]Editing a number of lists of a share point site together

I don't know if this is the right place to ask but I am creating a powerapp canvas based app.我不知道这是否是正确的地方,但我正在创建一个基于 powerapp canvas 的应用程序。 My data source are saved as share point list files.我的数据源保存为共享点列表文件。 I have to change the column type from single line of text to Choice for all those list files.对于所有这些列表文件,我必须将列类型从单行文本更改为选项。 As I have a very large number of lists ( Around 100) and each list contains 30-40 columns, changing one by one seems impossible.由于我有大量列表(大约 100 个)并且每个列表包含 30-40 列,因此一一更改似乎是不可能的。 Is there a way I can change the column type of all the lists at once?有没有办法一次更改所有列表的列类型? Even a way to change the column type of all columns of a single list at once would ease the work a bit., Please help?即使是一次更改单个列表的所有列的列类型的方法也会减轻工作量。请帮忙? If it's not possible directly?如果不能直接? is it possible in javascript.在 javascript 中是否可能。 can you nudge me to the right direction?你能把我推向正确的方向吗? Thanks.谢谢。

list列表

The easiest way is to run powershell pnp script to update all column types.最简单的方法是运行 powershell pnp 脚本来更新所有列类型。

#Set Variables
$SiteURL = {siteUrl}
$ListNames = ("List1","List2");
$ColumnName = "Single"
    
#Connect to PNP Online
Connect-PnPOnline -Url $SiteURL -UseWebLogin
     
ForEach($listName in $ListNames)
{
   $field = Get-PnPField -List $listName -Identity $ColumnName -Includes FieldTypeKind
   $field.FieldTypeKind = [Microsoft.SharePoint.Client.FieldType]::Choice
   $field.Update()
}
Invoke-PnPQuery

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

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