Thursday, February 8, 2018

Create custom views on survey lists - SharePoint 2013

Cannot create custom view in SharePoint survey List.


Select any Survey list-->Survey Settings

http://********/InvIncidentReporting/_layouts/survedit.aspx?
List=%7BBF870743%2D9654%2D4E19%2DB4B1%2D35527D4BE942%7D


Edit URL with "viewtype" in place of "survedit"

http://********/InvIncidentReporting/_layouts/viewtype.aspx?
List=%7BBF870743%2D9654%2D4E19%2DB4B1%2D35527D4BE942%7D


Now you are able to see all types view and you can create views based filters,sorting, grouping etc like custom/issue tracking list.

SharePoint 2013 Display promoted links on multiple rows - script

Every item has a default of 160px, so when you want to show rows of 3 items, just limit the space to 3*160 = 480px.
Simply add a content editor or script editor to the page and add this code:

<style>
/*display rows of 3 items*/
.ms-promlink-body {
      width: 480px;
}
</style>

If you also have buttons on top (when you have more items in the row than can be shown on the page), you can add this part to the script to remove those buttons:

<style>
/*hide the arrows when you have more items than viewable*/
.ms-promlink-header{
display:none;
}
</style>

Always Open SharePoint 2013 Tasks in Edit Mode

  • Open the task list in SharePoint Designer and create a new List Form
  • In the Create New List Form window, set the Filename as “RedirectToEditForm”, the type as Display, and check “Set as the default for the selected type”. Also pick your Workflow Task content type.
  • Open the Form in Designer so that the code is displayed, then click the “Advanced Mode” button in the ribbon bar. This will open the entire page for edits. 
  • Insert the following javascript directly after the line <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> (this is around line 15) 
  • <script type="text/javascript">
        <!--
        var origUrl = window.location.toString();
        var editUrl = origUrl.replace("RedirectToEditForm","EditForm");
        window.location = editUrl;
        //-->
    </script>
  • Save the form, accepting the change from the site definition

Now whenever someone opens a task, the EditForm is automatically displayed and only one click is needed to approve or reject the task

Hide "See Also" panel in Display Forms - SharePoint 2013

On the right-hand side of the screen when viewing the display form of a task item, there is a “See Also” section that displays documents which don’t apply to the task. How to hide "See Also"?


Add Content Editor web part in Display form. Insert code:


<style>

.ms-recommendations-panel{

       display:none !important;

}

</style>