Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

how to set to a view - please help

$
0
0

All,

I have a large list in SP. I can view the list using views. I need to read the list through the view so I can do some operations. Not sure how to set to that view if I have CreateAllItemQuery. 

Can someone please post an example.

Thanks,

$ClientContext = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName, $SecurePassword)
$ClientContext.Credentials = $credentials
$ClientContext.ExecuteQuery()

# Query SharePoint List
try{
    $list = $ClientContext.Web.Lists.GetByTitle($SP_List)
    $SP_List = $list.GetItems([Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery())  
    $ClientContext.Load($SP_List)
    $ClientContext.ExecuteQuery()


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>