I am creating an SPFX web part which queries a list in SharePoint Online
This works fine:
camlQuery = "<Query><OrderBy><FieldRef Name='LinkTitle' Ascending='TRUE' /></OrderBy></Query>"
It brings back all values from the list.
However if I try to just bring back certain rows:
camlQuery = "<View><Query><Where>";
camlQuery += "<Or>";
camlQuery += "<Eq><FieldRef Name='onPremisesSamAccountName'></FieldRef><Value Type='Text'>bloggsj</Value></Eq>";
camlQuery += "<Eq><FieldRef Name='onPremisesSamAccountName'></FieldRef><Value Type='Text'>bloggsa</Value></Eq>";
camlQuery += "<Eq><FieldRef Name='onPremisesSamAccountName'></FieldRef><Value Type='Text'>bloggsb</Value></Eq>";
camlQuery += "</Or>";
camlQuery += "</Where></Query></View>";
I get the error:
Error making HttpClient request in queryable [500] Internal Server Error ::> {"odata.error":{"code":"-2147467259, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"Cannot complete this action.\n\nPlease try again."}}}