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 ...
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 ...
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 ...
3
votes
Getting List Items in Javascript
Changed var query = SP.CamlQuery() to var query = new SP.CamlQuery() problem solved. Whoops.
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)
...
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 ...
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();
}
}...
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 ...
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
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 ...
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.
...
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 ...
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 ...
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 ...
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
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 ...
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
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 ...
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 {
...
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 ...
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 ...
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 ...
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 ...
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 = ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
splist × 187splistitem × 49
list × 20
2010 × 19
development × 19
sharepoint-online × 15
sharepoint-enterprise × 14
powershell × 11
spfield × 11
2013 × 10
spquery × 10
splistitemcollection × 9
javascript × 8
sharepoint-foundation × 8
list-view × 8
web-part × 7
sharepoint-server × 6
workflow × 5
spweb × 5
spview × 5
permissions × 4
2007 × 4
client-object-model × 4
calculated-column × 4
list-template × 4