Tag Info

New answers tagged

2

CAML schema is case-sensitive. You need to change <values> to <Values>. In general all elements are capitalized, but for some reason there are elements like <CHOICES> written in uppercase. When in doubt, best reffer to Collaborative Application Markup Language (CAML) schemas on MSDN.


1

sigh .... Turns out I should have removed the .get_url() from my if condition and it should have been: if(oListItem.get_item("Image"))


1

You can use: string value = (new SPFieldLookupValue(item["FieldName"] as String)).LookupValue


0

What is the solution to the get the value of lookup field var table = $('#example').DataTable({ "filter": true, "bDestroy": true, "bProcessing": true, "aaData": data.d.results, "aoColumns": [ { "mData": "ID" }, { "mData": "Title" },{ "mData": "lookupfield" },]


0

A little more background, AddItem() is the preferred method because as the list gets larger, it has to download all the items in the list when you call list.items.add() in order to add the one item. This is why MS created the AddItem() call so that you could add an item without doing a query of all items in the list. Avoid calling .Items off of a SPList ...


0

Available also in CSOM https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.client.listitem.fieldvaluesastext.aspx And REST https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListItemProperties As far as I can tell, not available in SSOM ...


1

SharePoint object model also has a nifty way of getting all the values. GetDataTable method returns a data table with all the field values. Update: To return all fields as string, you can clone the DataTable and get string values in another DataTable. DataTable dt = list.GetItems(new SPQuery()).GetDataTable(); DataTable dtClone = dt.Clone(); //just copy ...



Top 50 recent answers are included