New answers tagged

1

If you want to show the total number of items shown in a pie chart you can use the DataTable class's getNumberOfRows() method to get the number and then display this number somewhere on the page next to the pie chart. See reference here: https://developers.google.com/chart/interactive/docs/reference#DataTable If what you meant is you want each slice on ...


2

Find folder name from ServerUrl of your document. It should look like "/{LibraName}/{FolderName}/{fileName.extention}" So the folder is always before the document. Coding Changes cqy.set_viewXml("<View Scope='RecursiveAll'> <ViewFields> <FieldRef Name='ID'/> <FieldRef ...


1

You are confusing your list item ID values which are 1-based integers with the SPListItemCollection index which are 0-based integers. If you examine the output of the MSDN sample code here: SPListItem.ID property you will see SPListItemCollection index doesn't match the list item ID. In addition, if you look here: SPListItemCollection.Item property ...


0

Well it was a wrong method am using instead of : SPListItem oListItem = oList.GetItemById[_listitemID]; //


3

You can create a Custom Timer Job which will monitor the items. Just compare the current date and item modified field. For example var lastModified = (DateTime.Now - (DateTime) item["Modified"]).Days; If the duration is greater than or equal to 20 days, then take action. Steps of creating Custom Timer Job for on-premise, find here Create and Deploy Custom ...


0

I think this would be the cleanest way of doing it with C#: if ((bool)item["ShowTitle"] == true) { //Do stuff }


0

Why do you call: this.set_item('Status', 2); instead of: oListItem.set_item('Status', 2); Also, why do you call: this.listItem.update(); instead of: oListItem.update(); And also: don't use the Id of the choice value you want, but directly the string value. So the set_item call should actually be: oListItem.set_item('Status', 'Reviewed');



Top 50 recent answers are included