Skip to main content
6 votes

How to get the value of list count in SPWeb level?

SPWeb.Lists.Count.ToString(); is correct way to find number of Lists for any SPWeb. You might be seeing in difference in count you see here and in Site is because SharePoint has couple of hidden list ...
Siddharth Vaghasia's user avatar
4 votes

Hide/Disable a few columns from entering in SPList

While the other two answers here are correct in that it is fairly straightforward to hide the fields conditionally based on the Title value, what I think is going to be more of a problem for you is ...
Dylan Cristy's user avatar
  • 12.8k
4 votes
Accepted

How to get the value of list count in SPWeb level?

This is because of the SPWeb.Lists.Count.ToString(); return the number of all lists and libraries not only lists To can get the accurate number of lists only you should exclude the library and other ...
Mohamed El-Qassas MVP's user avatar
3 votes

Getting List Items in Javascript

Changed var query = SP.CamlQuery() to var query = new SP.CamlQuery() problem solved. Whoops.
ICW's user avatar
  • 434
3 votes
Accepted

How to change the list name using c#?

using (var oSite = new SPSite(fundURL)) { using (var oWeb = oSite.OpenWeb()) { var listWithArticles = oWeb.Lists.TryGetList("Articles"); if(listWithArticles != null) ...
Goshky's user avatar
  • 2,058
3 votes
Accepted

Calculated Column Filter fails when list view limit is reached

The 5000 limit is not on the number of items displayed, but on the number of items processed to get the result. To filter to find only one item in a list of 10,000 requires the scanning of all 10,000 ...
Mike Smith - MCT's user avatar
3 votes

How to get the value of list count in SPWeb level?

Try following code using (SPSite site = new SPSite("Web Url")) { using (SPWeb web = site.OpenWeb()) { Console.Write(web.Lists.Count); Console.ReadLine(); } }...
Akshay Belure's user avatar
2 votes
Accepted

SPListItem will accept the column display name OR the column internal name

From MSDN: https://msdn.microsoft.com/library/microsoft.sharepoint.splistitem For an indexer based on a name, Microsoft SharePoint Foundation first looks for the field by internal name and then ...
Juan Pablo Pussacq Laborde's user avatar
2 votes

SPGridView - How to make it look & feel like built-in SP grid

https://code.msdn.microsoft.com/office/Ejemplos-sobre-cmo-usar-el-69cd5f16 SP GridView Sample Code with C sharp
devnation's user avatar
  • 306
2 votes
Accepted

Modifying a list item field using powershell without changing the following values (modifed/modifiedby/Version)

The SystemUpdate() method is indeed what you are looking for. This method will update the item without changing the Modified, Modified By, and Version fields. Your PowerShell script will do exactly ...
Mihail's user avatar
  • 2,079
2 votes
Accepted

How can I programatically move an SPListItem from a source list to a destination list (into a specific folder of the list)?

The answer to 1) is "no". You need to copy, then delete. There is no "move". The answer to 2) is "no". You need to attach the attachments manually after you created the item in the destination. ...
Nils's user avatar
  • 2,337
1 vote

Only secure content is displayed message in IE browser of newform.aspx of my SPList in SPO

try add this site to Trusted (or Intranet) Zone in Internet Explorer, it should resolve this: In Internet Explorer, click Tools, click Internet Options, and then click the Security tab. In the Select ...
Zdeněk Vinduška's user avatar
1 vote

Redirect to another-page-from-newform.aspx with the new items id in O 365 SPO Custom List

You will either have to get the last item id from the list and then create the url or create a custom new form or override the save action such that you save the item first and then redirect to the ...
harshal gite's user avatar
  • 1,474
1 vote

Rename the "New Item" text in SPO list New Form to a meaningful Title

You are able to do it, but it is a bit roundabout. Pro tip: If you haven't used PowerApps to customize forms before now, I highly recommend going through the intro tutorial that should popup when ...
vanblart's user avatar
  • 687
1 vote

Create custom property of a SPListCollection in Sharepoint 2013

You will need to develop a Custom Editor part for your web part, it will not work with enum. Please have a look at Creating a Web Part with a Custom Editor Part
Arsalan Adam Khatri's user avatar
1 vote
Accepted

SPList workflowassociations is empty

in the first one your using the list to get the workflow association but in the second example your using WorkflowServicesManager that you then pass through the ListID guid through to retrieve the ...
Ali Jafer's user avatar
  • 17.8k
1 vote
Accepted

how to create a calculated fields programmatically

You can not write the ID field, it is set by SharePoint after the Item is created in the SQL server database
Danny '365CSI' Engelman's user avatar
1 vote
Accepted

SharePoint 2013 Calculate Total Field in SPList

Out of the box, there is no solution to sum the values in the column. So I have used JavaScript to achieve that. This script requires the field name you want to sum on the list view page. But the ...
Venkat Konjeti's user avatar
1 vote

How to add html in calculated column of a list in SharePoint 2013?

I found this solution: $(document).ready(function() { var theTDs = document.getElementsByTagName("td"); var i=0; var TDContent = " "; while (i < theTDs.length) { try { ...
Rajiv's user avatar
  • 91
1 vote
Accepted

SPOnline Create Document List and Modify Advanced Properties

You do not have to execute query after ctx.Web.Lists.Add(list);. Simply store the list into a variable, and change the settings you need to change. You can do a single ExecuteQuery(); at the end. I ...
wjervis's user avatar
  • 5,738
1 vote

Automatically create HTML pages on adding an item in SP 2013 list

Don't think in creating pages; Think in one (webpart)page that has dynamic content (metadata in your employee list) Instead of solving it with code if you have a hammer everything starts to look ...
Danny '365CSI' Engelman's user avatar
1 vote

Hide/Disable a few columns from entering in SPList

You can manage through JavaScript Write a function to hide/show fields you wanted by passing value of Title field. Hide fields on empty or matches to myTitle5, and myTitle6 Call this function on a ...
Venkat Konjeti's user avatar
1 vote

Hide/Disable a few columns from entering in SPList

You need JavaScript, attach an onchange eventListener on the Title field, then hide/show the other fields accordingly The Show/Hide part has been asked and answered many times before here on SO, use ...
Danny '365CSI' Engelman's user avatar
1 vote
Accepted

Default Value When Adding New Field

Yes, you must use Default element (child of Field element) in Field XML. UPDATE: Example based on your code: var addColumnToList = function(title, fieldName, type, defaultValue) { var context = ...
Paweł Hawrylak's user avatar
1 vote

SPListItem will accept the column display name OR the column internal name

Hi Prefer using internal name while query because when change the column name to something else then the query won't work by using display name. Try querying record by changing the column display ...
Sunil Sahu's user avatar
  • 1,778
1 vote

How to change internal field name(column name) of sharepoint list?

when you have reports that connected to this datas or when we have same internal name like year and want to use site column for example : Year and SharePoint Entity internal name set Year0 with zero ...
saber tabatabaee yazdi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible