How to bulk add user names into SP list with grid mode

Harry N Nomikos 1,336 Reputation points
2022-05-30T23:52:45.297+00:00

Hi Team

I need a work around where I can add usernames into name column which feeds straight off our organisation directory.

I don't want to change the field into a free text column and this is the only column I can't bulk add without any manual input.

I've provided a screenshot of how it looks when in grid mode

206812-image.png

The below screenshot is what I need to do for it to save

206786-image.png

I want to be able to paste it in once without needing to go through each entry.

Thanks,
Harry

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Yi Lu_MSFT 17,611 Reputation points
    2022-05-31T03:07:47.55+00:00

    Hi @Harry N Nomikos
    Currently I have not reproduced your problem on my site. I create a person or group column and edit in grid view, everything seems to be OK, when I type in a part of one's name, the whole information will appear (Did I understand it wrong?) :

    206789-image.png

    You could change a list/site to check whether this issue persist.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Yi Lu_MSFT 17,611 Reputation points
    2022-06-03T10:00:29.463+00:00

    Hi @Harry N Nomikos
    You could bulk add value to list column according to a CSV using powershell, as CSV is easier to be bulk edited, we could complete it by using CSV then add the value to SharePoint list.

    $SiteURL = "https://crescent.sharepoint.com/sites/PMO"  
    $ListName = "Projects"  
    $CSVFilePath = "C:\Temp\FieldTemplate.csv"  
       
    Try {     
        #Connect to the site  
        Connect-PnPOnline -Url $SiteURL -Interactive         
           
        #Get the List  
        $List = Get-PnPList -Identity $ListName  
       
        #Get Data from the CSV file  
        $CSVData = Import-Csv -Path $CSVFilePath  
       
        #Process each row in the CSV  
        ForEach($Row in $CSVData)  
        {  
            Try {  
                    Write-host "Adding Column '$($Row.DisplayName)' to the List:" -f Magenta  
                    #Check if the column exists in list already  
                    $Fields = Get-PnPField -List $ListName  
                    $NewField = $Fields | where { ($_.Internalname -eq $Row.Internalname) -or ($_.Title -eq $Row.DisplayName) }  
                    If($NewField -ne $NULL)   
                    {  
                        Write-host "`tColumn $Name already exists in the List!" -f Yellow  
                    }  
                    Else  
                    {  
                        #Create the field based on field type  
                        Switch ($Row.Type)  
                        {  
                            'Single Line of text' {  
                                Add-PnPField -List $ListName -Type Text -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Multiple lines of text' {  
                                Add-PnPField -List $ListName -Type Note -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Number' {  
                                Add-PnPField -List $ListName -Type Number -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Person or Group' {  
                                Add-PnPField -List $ListName -Type User -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Date and Time' {  
                                Add-PnPField -List $ListName -Type DateTime -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Yes or No' {  
                                Add-PnPField -List $ListName -Type Boolean -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Currency' {  
                                Add-PnPField -List $ListName -Type Currency -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Choice' {  
                                Add-PnPField -List $ListName -Type Choice -Choices @($Row.Data.Split(",")) -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Hyperlink or Picture' {  
                                Add-PnPField -List $ListName -Type URL -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Managed Metadata' {  
                                Add-PnPTaxonomyField -DisplayName $Row.DisplayName -InternalName $Row.Internalname -TermSetPath $Row.Data -List $ListName -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                            }  
                            'Lookup' {  
                                #Get Lookup options - first part represents the Lookup Parent list, second part for lookup field in the parent list  
                                $LookupOptions = $Row.Data.Split(";")  
                                Add-PnPField -List $ListName -Type Lookup -DisplayName $Row.DisplayName -InternalName $Row.Internalname -Required:([System.Convert]::ToBoolean($Row.IsRequired)) -AddToDefaultView | Out-Host  
                                Set-PnPField -List $ListName -Identity $Row.Internalname -Values @{LookupList=(Get-PnPList $LookupOptions[0]).Id.ToString(); LookupField=$LookupOptions[1]}  
                            }  
                            Default {  
                                Write-host "`tColumn Type '$($Row.Type)' not Found!" -f Red  
                            }  
                        }  
                    }  
                }  
            Catch {  
                write-host -f Red "`tError Adding Column '$($Row.DisplayName)' to List:" $_.Exception.Message  
            }  
        }  
    }  
    Catch {  
        write-host -f Red "Error:" $_.Exception.Message  
    }  
    

    For more information, you could refer to:
    https://www.sharepointdiary.com/2021/02/powershell-to-create-multiple-fields-in-sharepoint-online-list-from-a-csv.html

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Yi Lu_MSFT 17,611 Reputation points
    2022-06-06T01:35:51.777+00:00

    Hi @Harry N Nomikos
    Per my knowledge, currently there is no OOTB method or other workaround except powershell to bulk add value to person or group column. In UI we could only copy the names to each field one by one.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. Goszczynski, Adrian 0 Reputation points
    2025-01-13T11:55:58.98+00:00

    You can achieve it with following way:

    • Combine the DisplayName and Email fields in the following format: DisplayName,#Email.
    • Separate each team member's information with a semicolon (;).

    See output for following data:

      John Doe,#john.doe@example.com; Jane Smith,#jane.smith@example.com
    
      "ProjectTeam": [
          {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
              "Claims": "i:0#.f|membership|john.doe@example.com",
              "DisplayName": "John Doe",
              "Email": "john.doe@example.com",
              "Picture": "https://example.com/userphoto/john.doe",
              "Department": "Engineering",
              "JobTitle": "Software Engineer"
          },
          {
              "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
              "Claims": "i:0#.f|membership|jane.smith@example.com",
              "DisplayName": "Jane Smith",
              "Email": "jane.smith@example.com",
              "Picture": "https://example.com/userphoto/jane.smith",
              "Department": "Marketing",
              "JobTitle": "Marketing Manager"
          }
      ]
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.