Hot answers tagged

24

Create a list view and set the filter; where date time column is not empty (see below)


12

Go to Advanced Settings and Enable the Allow management of content types. Now you will see the content types associated with the list under the Settings section. Click on Item. Select the column. Check the Required radio button.


9

You can do this in JavaScript by using the SPUtility.js library PS, in this exemple I have used SharePoint 2010, but it's the same with SP 2013 As example I have created a simple list 'sequential number' with: Title (simple text). Occurrence # (simple text), this is our auto increment id Every list has three default forms to add, display and edit ...


8

Modified: Identifies a field that contains the last modified date and time information that is associated with the specified SharePoint Foundation object. Last_x0020_Modified: Identifies a field that contains version control information for the last modified version of the specified SharePoint Foundation list object. The ‘Modified’ column as we see in the ...


8

A little JavaScript employing jQuery does the job just perfectly. $(document).ready( function () { // has to be on an interval for grouped doc libraries // where the actual links are loaded only once a group // is expanded setInterval( function () { $("a[onclick*='return DispEx'][target!='_blank']") .attr("...


7

In the Document Library (or List) settings: Under the section "Content Types" click "Change new button order and default content type" Uncheck "Visible" for the Content Type you want to hide Click OK


5

If you are calling the ItemAdding event, the ListItemId is not going to exist yet. Try using the ItemAdded event instead.


5

Usually the list item ID number is used to do this. I'm not sure how different this is in 2013, but 2010 you would need to edit the form used to add items to the list and add a data connection of type retrieve data from a list, select you list, then select the ID field. Then create a rule to query for the data using the "Query for data" action and select ...


5

SharePoint contains a hidden Site Column called ItemChildCount. This Site Column stores the calculated number of child items that the folder contains. Note: It does not include the number of subfolders in this count nor does it work recursively and pick up the item counts of subfolders To add the Item Child Count, edit the desired view on your ...


5

I ran into this issue myself just recently. I found a related thread over at Microsoft's forums: https://social.technet.microsoft.com/Forums/office/en-US/c9703b7b-a719-48b4-9350-9d9a75ac62e1/list-item-shared-with-dialog-error?forum=sharepointgeneral The answer for me lied there in one of the suggested answers by the user Martin B. One thing to note, ...


5

The REST API does not have complete support for folders - particularly when it comes to working with list items. While it's quite possible that there is a way to get this to work using the REST API, you're much better off using the Client Object Model in this case. See: SP2013 : Create a list item inside a folder


4

As long as the source and target lists are in the same site collection, you can move them with Manage Content and Structure (_layouts/sitemanager.aspx.


4

You can add these lines of CSS using a content editor webpart to hide the delete button. /* For Dispform.aspx */ a[id="Ribbon.ListForm.Display.Manage.DeleteItem-Medium"] { display:none; } /* For Editform.aspx */ a[id="Ribbon.ListForm.Edit.Actions.DeleteItem-Large"] { display:none; }


4

I had a similar requirement sometime ago. Due to browser compatibility issues, I ended up using window.prompt, shifting the control of the copy/paste functionality over to the user: window.prompt ("Copy to clipboard: Ctrl+C, Enter", text); BTW, the text will already be selected, so the user simply has to press CTRL+C. At the time I believe this is where ...


3

The XsltListViewWebPart, which is one of the default web parts you can drag onto a form in SharePoint Designer, has an "Auto Refresh" and a "ManualRefresh" property which may get you what you want. Read further below for a script that addresses your question specifically. FWIW, if you create it programatically, I just happen to have a handy snippet: ...


3

I found the solution. To achieve it via the UI, I go to Site Settings > Site Content Types > click on the custom content type, then click each field and voila!


3

It looks like if you go into Site Settings > Site Permissions > Edit > Permission Levels > Add a Permission Level you can create a custom permission level that lets user do everything but delete an item. Then apply that custom permission level to all the users and groups of the task list.


3

I have solved this issue. There is such property as LeafName in SPRecycleBinItem, which is the same as earlier Id in SPListItem for files (not for folders). If SPListItem was a file, then its LeafName would be "id" + "_.000" after deleting; If SPListItem was a folder, then its LeafName would be earlier Name of SPListItem.


3

You can use Properties.AfterUrl and then split it by "/" and get the last part of string to get document Name. Link to source


3

You can make the content type hidden by using PowerShell: Example: $web = Get-SPWeb -Identity http://aissp2013:111 $list = $web.Lists["TestList"] $list.ContentTypes["TestCT"].Hidden = $true $list.ContentTypes["TestCT"].Update() UPDATE However, the above code or the steps given by @Robert will not hide Content Type dropdown from Edit page. That can be done ...


3

After the first query that creates Folder object you could perform the second REST request: http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/listItemAllFields to retrieve the associated List Item with a Folder. The following JavaScript example demonstrates that approach: function executeJson(url,method,...


3

You can make use of the SequenceNumber property that is associated with the SPEventReceiverDefinition object. https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceiverdefinition.sequencenumber.aspx This property determines the order in which event assemblies execute. This is especially important when there are multiple assemblies that ...


3

Search uses Delete policy for access denied or file not found When the crawler encounters an access denied or a file not found error, the item is deleted from the index if the error was encountered in more than ErrorDeleteCountAllowed consecutive crawls AND the duration since the first error is greater than ErrorDeleteIntervalAllowed hours. If both ...


3

I have seen this happen before (when a programmer without SharePoint knowledge 'fixed' a problem with imported/pasted data and emptied/deleted the existing definition of DropDown values The underlying database stores anything that is written to it, so modern JSOM code can write values to a 'DropDown' field without checking those values actually match with ...


3

It is possible to set or update ReadSecurity or WriteSecurity using REST API and JSOM both. REST API Request body { "__metadata": { "type": "SP.List" }, "ReadSecurity": 2, "WriteSecurity": 4 } End-point /_api/web/lists/getbytitle('{List Name}') You need to make an UPDATE request to above end-...


3

You can implement OoB Information Retention Policy where you can have the Modified Date greater than or equal to Closing Date. Item should be deleted.


3

You can set up retention policy to start a workflow when any condition (in your case closing data is today) is satisfied. In that workflow you can set step to delete the item. This way multiple items can trigger workflow to do the required functionality.


3

Use Audience Targeting. That's the Out of Box feature available to meet your requirement. Create two separate views. In one view you give access to all groups while for other view you edit the page and in Audience targeting for that particular view, you list down the groups name you want to give access to.


3

This gives you the string label of the version: $objFile.UIVersionLabel This gives you the Major version: $objFile.MajorVersion This gives you the Minor version: $objFile.MinorVersion Edit: The code above works with documents. The following will work with list items: Assuming you have the id of your list item (in your example that is: "x"), you can ...


3

As Rob very correctly mentioned, REST API doesn't have complete support for folders. But using the old /_vti_bin/listdata.svc, you can create a list item and add it inside a folder. For that, you need to set the Path property as server-relative url Try with below code: $(document).ready(function () { function createListItem(webUrl,listName,...


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