Forum Replies Created
-
AuthorPosts
-
Hi Alex, Any update on this ?
Sent you over the email.
Here you go…
Attachments:
Not able to upload a .txt, .docx file types.
Here you go…
Hello,
Yes – A View Fields are same in both the forms and also same config too. No errors in F12 as well. please find the vLookUp config below.
Attachments:
I could see this on the console.
Attachments:
var query = “<Where><Eq><FieldRef Name=’Name’ ></FieldRef><Value Type=’User’> PreferredName</Value></Eq></Where>”;
var camlViewFields = [“Reports_x0020_To”, “Department”, “Position”, “Job_x0020_Title”, “Hire_x0020_Date”,
“Perm_x0020_Date”, “Status”, “ADP_x0020_File_x0020__x0023_”, “Location”, “Company”,
“ADP_x0020_File_x0020__x0023_”, “Sprout_x0020_Employee_x0020_ID”];var res = spjs.utility.queryItems({
“listName”: “TestList”, // List display name or GUID
“listBaseUrl”:”http://team/XYZ/”,
“query”: query,
“viewFields”: camlViewFields,
“primaryKey”:”1″
});
if(res.count>0) {
console.log(res.items) ;
}
else {
console.log (“No Items”);
}
In the above snippet, I am trying to query the TestList which resides at SharePoint 2016 On-Prem.Then the count is always 0, nut when I try to query any list which is there on Same SharePoint Online, it works… Is this a limitation ?Attachments:
Thanks, Worked.!!!
Here’s the screenshot
Attachments:
Also, the Query doesn’t seems to work, as in the res.items.Count is getting me the entire list item count, instead it should be 1.
No specific error, but just that the res.items is 0, whereas the res.items has a count with SharePoint Online Lists.
Thanks , this worked. Just a last check, When the Query list resides on SharePoint 2016 On-Prem, this solution fails, is that a limitation? For any SharePoint Online list, I am able to get the values.
Hi Again,
While using the above code, on the TestList, I am getting the below error. Where get list items is success, but the control executes the error block.Attachments:
Hi Alex,
Sorry for the delayed reply. I have tried using the SPJS.Utility method as suggested by you and getting the below error at ViewFields. When I try to read the items from a sample list (DFFS_TestList) the same code works like a charm. Is there any item limit for CamlViewfields.Below is the code :
var query = “<Query><Where><Eq><FieldRef Name=’Name’ /><Value Type=’User’>” +PreferredName + “</Value></Eq></Where></Query>”;
var camlViewFields = “<ViewFields><FieldRef Name=’Reports_x0020_To’/><FieldRef Name=’Department’/><FieldRef Name=’Position’/><FieldRef Name=’Job_x0020_Title’/><FieldRef Name=’Hire_x0020_Date’/><FieldRef Name=’Perm_x0020_Date’/><FieldRef Name=’Status’/><FieldRef Name=’ADP_x0020_File_x0020__x0023_’/><FieldRef Name=’Location’/><FieldRef Name=’Company’/><FieldRef Name=’ADP_x0020_File_x0020__x0023_’/><FieldRef Name=’Sprout_x0020_Employee_x0020_ID’/></ViewFields>”;
var TeamLeadr_str = “”;
debugger;
spjs.utility.queryItems({
“listName”: “Staff Master List”, // List display name or GUID
“listBaseUrl”:”http://team/TraditionalQA”,
“query”: query,
“viewFields”: camlViewFields
});Attachments:
-
AuthorPosts