Problem retrieve all data from sharepoint list RRS feed

  • Question

  • Hi,

    this is a part of my code:

    #Get the List
    $List = $Ctx.web.Lists.GetByTitle($ListName)

    #Get All List Items
    $Query = New-Object Microsoft.SharePoint.Client.CamlQuery
    $ListItems = $List.GetItems($Query)
    $FieldColl = $List.Fields

    Foreach($Item in $ListItems)
        Foreach($Field in $FieldColl)

    I have a Column in my share point list with InternalName equal to "Project_x0020__x002f__x0020_Offi3"
    When I query with $Item.FieldValues I cannot see the key but when I query with $Field.Internalname I can see the InternalName; for this reason I can't retrieve the Lookup Value using $Item[$Field.InternalName].LookupValue

    Could you please help me?


    Thursday, October 31, 2019 11:28 AM

All replies