You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read that are some issues to read may items from sharepoint? I have tested with 500 and it seams to work for me. Are there any limitations how many items you can read?
I would like to make a query when I read from sharepoint. I got a date field in my sharepoint list and I would like only to read the items that is newer than a specific date. It that possible? (My sharepoint lits will contain many items ...)
I use the code below:
use Office365\SharePoint\ClientContext;
use Office365\Runtime\Auth\ClientCredential;
use Office365\SharePoint\ListItem;
$credentials = new ClientCredential("{client-id}", "{client-secret}");
$client = (new ClientContext("https://{your-tenant-prefix}.sharepoint.com"))->withCredentials($credentials);
$web = $client->getWeb();
$list = $web->getLists()->getByTitle("{list-title}"); //init List resource
$items = $list->getItems(); //prepare a query to retrieve from the. How do I make q query here?
$client->load($items); //save a query to retrieve list items from the server
$client->executeQuery(); //submit query to SharePoint server
/** @var ListItem $item */
foreach($items as $item) {
print "Task: {$item->getProperty('Title')}\r\n";
}
The text was updated successfully, but these errors were encountered:
{
"error": {
"code": "-2147024860, Microsoft.SharePoint.SPQueryThrottledException",
"message": {
"lang": "en-US",
"value": "The attempted operation is prohibited because it exceeds the list view threshold."
}
}
Hello,
I have read that are some issues to read may items from sharepoint? I have tested with 500 and it seams to work for me. Are there any limitations how many items you can read?
I would like to make a query when I read from sharepoint. I got a date field in my sharepoint list and I would like only to read the items that is newer than a specific date. It that possible? (My sharepoint lits will contain many items ...)
I use the code below:
use Office365\SharePoint\ClientContext;
use Office365\Runtime\Auth\ClientCredential;
use Office365\SharePoint\ListItem;
$credentials = new ClientCredential("{client-id}", "{client-secret}");
$client = (new ClientContext("https://{your-tenant-prefix}.sharepoint.com"))->withCredentials($credentials);
$web = $client->getWeb();
$list = $web->getLists()->getByTitle("{list-title}"); //init List resource
$items = $list->getItems(); //prepare a query to retrieve from the. How do I make q query here?
$client->load($items); //save a query to retrieve list items from the server
$client->executeQuery(); //submit query to SharePoint server
/** @var ListItem $item */
foreach($items as $item) {
print "Task: {$item->getProperty('Title')}\r\n";
}
The text was updated successfully, but these errors were encountered: