Showing posts with label SharePoint Development. Show all posts
Showing posts with label SharePoint Development. Show all posts

10/27/2015

SharePoint: Sort and Filter on One Column While Displaying Another

This article includes both 2010 and 2013 examples.

Let's say you wanted to display a Date/Time down to the minute or second, but you wanted the column heading to filter by days or months. By default the column filter dropdown displays one each of what ever it finds in the column, or in the case of dates, the nearest day.

image

But if you want just the months or years in the dropdown, then maybe something like this:

image        image

 

It's not to hard to do in SharePoint 2010, and fairly easy in SharePoint 2013

In SharePoint 2010 we still have a fully working SharePoint Designer that can easily edit web parts. In SharePoint 2013, Designer is pretty much broken for web part work, which is just as well as we should be looking at the newest tools in 2013 for our customizations. In this example we will be using JS Link for 2013.

 

Steps for SharePoint 2010

The basic steps:

  • Create a new list named "Event Announcements".
  • Add a Date and Time column named "EventDate".
  • Add a Calculated column named "Event Date" to display a YYYY-MM version of the date that can be used to filter by month.
  • Use SharePoint Designer to display the full date in the calculated column by hand customizing the XSLT.

Note: Although the names of my columns differ only by a space, you can use any column names you like. I will use EventDate for data entry and Event Date for display.

Steps:

  1. Go to your site and create a test list. For this example an Announcements list would be a good choice.
  2. Create a new column named "EventDate". (You will enter your date data here.) 
    1. In the List ribbon click Create Column.
    2. Enter "EventDate" as the name.
    3. Set the type to Date and Time.
    4. Set Date and Time Format to Date & Time.
    5. Click OK.
  3. Create a new column named "Event Date". (This column will control the filter grouping.)
    1. In the List ribbon click Create Column.
    2. Enter "Event Date" as the name.
    3. Set the type to Calculated.
    4. Enter this formula:
         =TEXT([EventDate],"yyyy-mm")
      or for years instead of months:
         =TEXT([EventDate],"yyyy")
    5. Set The data type returned from this formula to Single line of text.
    6. Click OK.
  4. Add some sample data with dates spread across two or three different months.
     
  5. Open SharePoint Designer 2010 and open your site.
  6. Click Lists and Libraries and click your list.
  7. Find and click your view (I used All Items).
  8. If the screen is not in Split view click Split at the bottom of the screen.
  9. In the Code view pane click in the web part code. (The code without the yellow background.)
  10. In the List View Tools / Design ribbon click Customize XSLT and Customize Entire View.
    image
  11. In the design view click on any one of the dates in the EventDate column.
       image
  12. Verify the field name by looking up a few lines for FieldRef_ValueOf. My field is EventDate.
       image
  13. In the design view click on any one of the dates in the Event Date column. (the calculated column)  This will highlight a line in the Code view.
  14. Edit the "value-of" element to change from this:
      <xsl:value-of select="$thisNode/@*[name()=current()/@Name]"/>
    to this:
      <xsl:value-of select="$thisNode/@*[name()='EventDate']"/>
    Note that you are replacing the expression "current()/@Name" to the name of the field wrapped in single quotes. I.e. 'EventDate'. EventDate is column from which you want to copy the data.
  15. Save the file.
  16. Return to the browser and test the view. You can edit the view and remove the EventDate column as we only need the Event Date column.
       image

 

Steps for SharePoint 2013

The basic steps:

  • Create the test list and columns. (Same steps as for 2010)
  • Create the JS Link JavaScript file.
  • Upload or save the file to a SharePoint library.
  • Edit the view's web part and link to the JS File.

Steps:

  1. Go to your site and create a test list. For this example an Announcements list would be a good choice.
  2. Create a new column named "EventDate". (You will enter your date data here.) 
    1. In the List ribbon click Create Column.
    2. Enter "EventDate" as the name.
    3. Set the type to Date and Time.
    4. Set Date and Time Format to Date & Time.
    5. Click OK.
  3. Create a new column named "Event Date". (This column will control the filter grouping.)
    1. In the List ribbon click Create Column.
    2. Enter "Event Date" as the name.
    3. Set the type to Calculated.
    4. Enter this formula:
         =TEXT([EventDate],"yyyy-mm")
      or for years instead of months:
         =TEXT([EventDate],"yyyy")
    5. Set The data type returned from this formula to Single line of text.
    6. Click OK.
  4. Add some sample data with dates spread across two or three different months.
     
  5. Open SharePoint Designer 2013 and your site.
  6. In the Navigation area click Site Assets. (or any other library)
  7. Right-click in any empty space in the file area and select New and HTML.
  8. Right-click the new file and rename it to GroupByMonthJSLink.js (any name will do)
  9. Click the new file and then click Edit File.
  10. Select all of the HTML and delete it.
  11. Enter the JavaScript listed below.
  12. Save the file.
  13. Go to the new list.
  14. Click Settings (gear) and Edit Page.
  15. In the list’s web part click the dropdown and click Edit Web Part.
  16. In the web part properties panel expand Miscellaneous.
  17. Enter the following path into the JS Link box:
    ~site/SiteAssets/GroupByMonthJSLink.js
    Note: "~site" points to current site/subsites URL while "~sitecollection" points to the top level site's URL.
  18. Click Apply. (You should see the change to the Event Date column.)
  19. Click OK
  20. In the Page ribbon click Stop Editing.
  21. Test! You can edit the view and remove the EventDate column as we only need the Event Date column.
       image

 

The JavaScript File

(function () { 

  // do all of the setup work...
  var TTNctx = {};
  TTNctx.Templates = {}; 

  // configure the Event_x0020_Date field to copy the EventDate values 
  // into the Event_x0020_Date column
  TTNctx.Templates.Fields = { 
    "Event_x0020_Date": 
{ "View": function (ctx) {return ctx.CurrentItem.EventDate} } }; // register the override SPClientTemplates.TemplateManager.RegisterTemplateOverrides(TTNctx); })(); // end of function

 

.

10/14/2015

SharePoint PreCancelAction

 

SharePoint does not have a PreCancelAction. I created what I needed for one project, and present it here for your creative uses and enhancements. No warranties and no support… but the price is right!

 

PreSaveAction

When you click Save from an ASPX list form SharePoint checks to see if you have added a PreSaveAction JavaScript function to the page. If you have included the function, it is called, your code run and then your code can return a True or False to allow the save to continue, or to cancel it. You can add this function directly to the page, via a Content Editor Web Part, and in 2013 as a JS Link. Do a web search to find examples of its use.

PreSaveAction sample:

<script type="text/javascript">
 function PreSaveAction() {
  // do pre-save work here: validation, messages, etc.
  alert('Thank you for your suggestion!');
  return true;  // return true to continue with the save 
                // or return false to cancel the save
 } 
</script>

 

PreCancelAction

I needed a popup message to stress "Changes not saved", so I put together some JavaScript that intercepts the cancel and displays a message to the user. 

All of the examples below look for INPUT tags with a VALUE of "Cancel". You may want to change this line to match your language requirements. The code also only intercepts INPUT tags that include "STSNavigate" in their onclick code. This is to avoid intercepting the attachment dialog's cancel button. The code stores all of the original onclick code in a globally scoped array named TTNoriginalFunctions as each Cancel button on the form may have had unique code.

 

Warn the user on cancel:

This example does not call your functions, it just intercepts the Cancel buttons and runs the imbedded alert code.

var TTNoriginalFunctions = [];
var TTNCounts = 0;
var TTNinputs  = document.getElementsByTagName("input")
for (var i = 0; i<TTNinputs.length; i++)
{
  if (TTNinputs[i].value == "Cancel") 
  {
    if (TTNinputs[i].onclick)
    { 
      if (String(TTNinputs[i].onclick).indexOf("STSNavigate")>-1)
      {
        TTNoriginalFunctions[TTNCounts] = TTNinputs[i].onclick;
        TTNinputs[i].onclick = new Function(" return function () { alert('Changes not saved'); TTNoriginalFunctions[" + TTNCounts + "]();}")();
        TTNCounts++;
      } 
    }
  }
}

 

Callable as a function:

This is the same as the above, but wrapped up in a function that you can call it from your code. You pass in the custom code to run as a string. This uses "new Function" to build the code from a string.

var TTNoriginalFunctions = [];

function TTNPreCancelAction(yourFunctionAsString)
{
  var TTNCount = 0;
  var TTNinputs  = document.getElementsByTagName("input")
  for (var i = 0; i<TTNinputs.length; i++)
  {
    if (TTNinputs[i].value == "Cancel") 
    {
      if (TTNinputs[i].onclick)
      { 
        if (String(TTNinputs[i].onclick).indexOf("STSNavigate")>-1)
        {
          TTNoriginalFunctions[TTNCount] = TTNinputs[i].onclick;
          TTNinputs[i].onclick = new Function(" return function () { " + yourFunctionAsString + "; TTNoriginalFunctions[" + TTNCount + "]();}")();
          TTNCount++;
        } 
      }
    }
  }
}


TTNPreCancelAction("alert('changes not saved')");

 

A solution that works more like SharePoint's PreSaveAction:

You could add the TTNPreCancelAction function listed below to your master page or an existing linked JavaScript library. You can then add a PreCancelAction function to forms as needed using SharePoint Designer edits, Content Editor Web Parts or JS Link, just like the PreSaveAction functions. Your PreCancelAction function must return "true" or "false".

// Add this function to a form
function PreCancelAction()
{
  alert('Changes not saved!'); return true;
  //return confirm('Are your sure? Data will be lost!')
}


// Add this code to each form, or once in the master page.
var TTNoriginalFunctions = [];
var TTNCount = 0;
function TTNPreCancelAction()
{
    var TTNinputs  = document.getElementsByTagName("input")
    for (var i = 0; i<TTNinputs.length; i++)
    {
      if (TTNinputs[i].value == "Cancel") 
      {
        if (TTNinputs[i].onclick)
        { 
          if (String(TTNinputs[i].onclick).indexOf("STSNavigate")>-1)  // ignore the Attachments Cancel!
          {
            TTNoriginalFunctions[TTNCount] = TTNinputs[i].onclick;
            TTNinputs[i].onclick = new Function(" return function () { if ('function'==typeof(PreCancelAction)) {if (!PreCancelAction()) {return false} }; TTNoriginalFunctions[" + TTNCount + "]();}")();
            TTNCount++;
          } 
        }
      }
    }
}

TTNPreCancelAction()  //intercept the Cancel buttons
 

 

 

Have a better solution? Post a comment below!  Smile

.

8/16/2015

They just can't leave anything alone! "App" now is "Add-in"???

 

Just as they have gotten everyone to call everything an "app", they have to change it again. Lists = apps, libraries = apps, web parts = app parts… everything was to be an app. Now everything is a "add-in"?

  • "SharePoint apps" are not SharePoint Add-ins.
  • "SharePoint app parts" are now "SharePoint add-in parts"

But strangely…

  • The SharePoint "app launcher" and the "My Apps" page are keeping their old names.

 

Everybody say "Add-In"! Smile

https://msdn.microsoft.com/EN-US/library/office/fp179930.aspx

The name "apps for SharePoint" is changing to "SharePoint Add-ins". During the transition, the documentation and the UI of some SharePoint products and Visual Studio tools might still use the term "apps for SharePoint".

Also see:  https://msdn.microsoft.com/EN-US/library/office/fp161507.aspx#bk_newname

 

 

So… what is an "App"?

List? Libraries?  Not too sure anymore…

Oh well…

.

4/22/2015

SharePoint Cincy - Let the SharePoint Search Genie Out of the Bottle!

 

Search Genie?

OK, that's a bit of a corny title, and a bit of a deception. My SharePoint Cincy presentation is really about the powerful things you can do with SharePoint 2013's search feature set… if you only had a Search Administrator.

SharePoint Cincy!

If you've been to one of my governance classes or presentations then you have heard me lecture, practically preach, on why you need a Search Administrator. It's an easy job, only an hour or two a week, but it's also one of the most important jobs in the ongoing operation of SharePoint. Attend my presentation and meet the Genie!

SharePoint Cincy is this Friday! There's still time to register!

 

Oh, and there's another 21 sessions you might want to attend, and a lot of networking to do. See you Friday!

 

Let the SharePoint Search Genie Out of the Bottle!

Mike Smith

MAX Technical Training - MVP

What’s the single most important thing you can do to make SharePoint 2013, on premises or in the cloud, work for your users? Make stuff easy to find! Some say that SharePoint search is easy. Just install it and let it do its thing, and in Office 365 you don’t even have to install it. But… your users can’t find anything, or they find thousands of unwanted things. They don’t know where to look, they can’t spell your CEO’s name, they can’t find their own expense report and they can’t even find the lunch menu! There’s a powerful genie hiding in search who can find what your users are searching for. All it needs is an Administrator to turn it loose! So let’s let the search genie out of the bottle and discover the power of SharePoint 2013 Search Administration.

.

4/14/2015

PowerShell: Collection was modified; enumeration operation may not execute

 

While the following example is for PowerShell, the same applies to C# code.

Collections that are being modified do not like to be processed with FOR EACH.
"Collection was modified; enumeration operation may not execute"

For example:

$web = Get-SPWeb someurl...

ForEach($list in $w.Lists)
{
  if (!$list.Hidden)
  {
    # do something to change the list
    # like add a new view...

    $list.Views.Add(.......)
    # error! 
    # "Collection was modified; enumeration operation may not execute..."
  }
 }
$web.Dispose()

 

The Fix

Change the FOR EACH to a FOR.

change:

  foreach($l in $web.Lists)
     {

to:

   for ($i=0; $i -lt $web.lists.count; $i++)
     {
        $l = $w.lists[$i]

 

And if you are deleting items in the collection…

Walk the collection in reverse order!

   for ($i=$web.lists.count-1; $i –gt 0; $i--)
     {
        $l = $web.lists[$i]

.

2/19/2015

Looking for __REQUESTDIGEST?

 

When the minimal Download feature is enabled, you cannot find the __REQUESTDIGEST by using Internet Explorer's View Source feature.

But there are two quick options:

  • You can find it using this JavaScript in the address bar:
    javascript:alert(document.getElementById("__REQUESTDIGEST").value)
  • Use the F12 Developer Tools. Click the DOM explorer then use the search box to search for __REQUESTDIGEST.

 

The Minimal Download feature?

What does the Minimal Download feature have to do with it? When enabled, this feature optimizes page downloads by only downloading what has changed since the last page load. Thing like Quick Launch, Top Link bar, Search, and the master page content in general, do not change when a user clicks links to lists and libraries. Cool feature? Some think not… If you are creating 2013 apps then you might want to take a look at this article: http://www.threewill.com/working-with-and-around-sharepoint-2013s-minimal-download-strategy/ and this one http://blogs.technet.com/b/jay/archive/2013/10/22/sp2013-new-feature-minimal-download-feature.aspx 

While I can't see huge differences with this feature enabled, I do find a lot of ugly URLs and issues with apps and with publishing sites. When doing development I do like to work with a URL like this:

https://yourServer/sites/yourSite/Shared%20Documents/Forms/AllItems.aspx

and not like this:

https://yourServer/sites/yourSite/_layouts/15/start.aspx#/Shared%20Documents/Forms/AllItems.aspx

 

image

 

.

2/10/2015

SharePoint 2013 List and Library Registration IDs, Feature IDs and ContentClass codes

 

Back in 2008 I created a list of SharePoint list and library registration IDs here. I updated it again in 2009, 2010 and 2014, and every time finding more list types to document. Well, I'm back again with yet another and larger list. The last update brought the list count up to 72 list types. This one ups the count to 107. While I was at it, I added the Feature that defines the list type, if the list type is typically searchable and the ContentClass codes that are used by search to find lists of that type. I will of course return to update this list again, and again, and again…

Column Notes:

  • Enum Name is from the Microsoft.SharePoint.SPListTemplateType enumeration. See the original article for C# and PowerShell examples of how to dump this list.
  • ID = the Registration ID, or list template ID. These are typically found in the Feature elements file that defines the list template. Example:
      <Elements …> <ListTemplate Name="announce" Type="104" …
  • Idx = Indexed by SharePoint search. If this is "No" or "Hidden" then you cannot use the contentclass code to search for these list types.
  • ContentClasses are used for searching for lists. A ContentClass search to find all Announcements lists might look like this:
       contentclass=STS_List_Announcements.
  • For each STS_List ContentClass there is a matching STS_ListItem to find all of the items in that type of list. For example, to find all announcements in SharePoint:
       contentclass=STS_ListItem_Announcements 
    or to find all of the announcements about the picnic:
       picnic contentclass=STS_List_Announcements
  • Refer to the original article for more details.

 

I will post an article in a few weeks that explores ContentClass and how it is used with search.

 

SharePoint 2013 List and Library Registration IDs, Feature IDs and ContentClass codes

 

Common Name

Enum Name

ID

Idx

ContentClass

Feature Name

Feature ID

 

InvalidType

-1

       
 

NoListTemplate

0

       

Custom List

GenericList

100

Y

STS_List

CustomList

00bfea71-de22-43b2-a848-c05709900100

Document Library

DocumentLibrary

101

Y

STS_List_DocumentLibrary

DocumentLibrary

00bfea71-e717-4e80-aa17-d0c71b360101

Survey List

Survey

102

Y

STS_List_Survey

SurveysList

00bfea71-eb8a-40b1-80c7-506be7590102

Links List

Links

103

Y

STS_List_Links

LinksList

00bfea71-2062-426c-90bf-714c59600103

Announcements List

Announcements

104

Y

STS_List_Announcements

AnnouncementsList

00bfea71-d1ce-42de-9c63-a44004ce0104

Contacts List

Contacts

105

Y

STS_List_Contacts

ContactsList

00bfea71-7e6d-4186-9ba8-c047ac750105

Events List

Events

106

Y

STS_List_Events

EventsList

00bfea71-ec85-4903-972d-ebe475780106

Tasks List

Tasks

107

Y

STS_List_Tasks

TasksList

00bfea71-a83e-497e-9ba0-7a5c597d0107

Discussion List

DiscussionBoard

108

Y

STS_List_DiscussionBoard

DiscussionsList

00bfea71-6a49-43fa-b535-d15c05500108

Picture Library

PictureLibrary

109

Y

STS_List_PictureLibrary

PictureLibrary

00bfea71-52d4-45b3-b544-b1c71b620109

 

DataSources

110

N?

 

DataSourceLibrary

00bfea71-f381-423d-b9d1-da7a54c50110

 

WebTemplateCatalog

111

N?

 

na

 
 

UserInformation

112

H

 

na

 

Web Part Gallery

WebPartCatalog

113

H

 

na

 

List Template Gallery

ListTemplateCatalog

114

H

 

na

 

Form Library (typically InfoPath forms)

XMLForm

115

Y

STS_List_XMLForm

XmlFormLibrary

00bfea71-1e1d-4562-b56a-f05371bb0115

Master Page Gallery

MasterPageCatalog

116

H

 

na

 

wfpub

NoCodeWorkflows

117

H

 

NoCodeWorkflowLibrary

00bfea71-f600-43f6-a895-40c0de7b0117

 

WorkflowProcess

118

N?

 

workflowProcessList

00bfea71-2d77-4a75-9fca-76516689e21a

Web Page Library

WebPageLibrary

119

Y

STS_List_WebPageLibrary

WebPageLibrary

00bfea71-c796-4402-9f2f-0eb9a6e71b18

 

CustomGrid

120

   

GridList

00bfea71-3a1d-41d3-a0ee-651d11570120

Solution Gallery

SolutionCatalog

121

H

     
 

NoCodePublic

122

N?

 

NoCodeWorkflowLibrary

00bfea71-f600-43f6-a895-40c0de7b0117

 

ThemeCatalog

123

H

     

Composed Looks

DesignCatalog

124

H

     

appdata

AppDataCatalog

125

H

     
 

DataConnectionLibrary

130

Y

STS_List_DataConnectionLibrary

DataConnectionLibrary

00bfea71-dbd7-4f72-b8cb-da7ac0440130

Preservation Hold Library

 

131

Y

STS_List_131

   
 

WorkflowHistory

140

H

 

WorkflowHistoryList

00bfea71-4ea5-48d4-a4ad-305cf7030140

Project Tasks List

GanttTasks

150

Y

STS_List_GanttTasks

GanttTasksList

00bfea71-513d-4ca0-96c2-6a47775c0119

 

HelpLibrary

151

   

HelpLibrary

071de60d-4b02-4076-b001-b456e93146fe

 

AccessRequest

160

   

AccessRequests

A0F12EE4-9B60-4ba4-81F6-75724F4CA973

Promoted Links

 

170

 

STS_List_170

PromotedLinksList

192EFA95-E50C-475e-87AB-361CEDE5DD7F

Tasks (2013 version)

TasksWithTimelineA ndHierarchy

171

Y

STS_List_TasksWith
TimelineAndHierarchy

HierarchyTasksList

f9ce21f8-f437-4f7e-8bc6-946378c850f0

 

MaintenanceLogs

175

   

MaintenanceLogs

8c6f9096-388d-4eed-96ff-698b3ec46fc4

Meeting Series

Meetings

200

H

 

na

 
 

Agenda

201

Y

STS_List_Agenda

na

 

Attendees

MeetingUser

202

Y

STS_List_MeetingUser

na

 

Decisions

Decision

204

Y

STS_List_Decision

na

 

Objectives

MeetingObjective

207

Y

STS_List_MeetingObjective

na

 

Text Box / Directions

TextBox

210

Y

STS_List_TextBox

na

 

Things To Bring

ThingsToBring

211

Y

STS_List_ThingsToBring

na

 
 

HomePageLibrary

212

   

na

 
 

Sites

300

   

SitesList

a311bf68-c990-4da3-89b3-88989a3d7721

Blog Posts/ Tabs List

Posts

301

Y

STS_List_Posts

BlogContent

0D1C50F7-0309-431c-ADFB-B777D5473A65

Blog Comments

Comments

302

Y

STS_List_Comments

BlogContent

0D1C50F7-0309-431c-ADFB-B777D5473A65

Blog Categories

Categories

303

Y

STS_List_Categories

BlogContent

0D1C50F7-0309-431c-ADFB-B777D5473A65

App Catalog

 

330

Y

STS_List_330

CorporateCatalog

0AC11793-9C2F-4CAC-8F22-33F93FAC18F2

Apps for Office

 

332

Y

STS_List_332

OfficeExtensionCatalog

61E874CD-3AC3-4531-8628-28C3ACB78279

App Requests

 

333

Y

STS_List_333

AppRequestsList

334DFC83-8655-48A1-B79D-68B7F6C63222

Restricted Permission List

 

397

   

AccSrvRestrictedList

A4D4EE2C-A6CB-4191-AB0A-21BB5BDE92FB

USysApplicationLog - Access

 

398

Y

STS_List_398

AccSrvUSysAppLog

28101B19-B896-44f4-9264-DB028F307A62

MSysASO - Access

 

399

Y

STS_List_399

AccSrvMSysAso

29EA7495-FCA1-4dc6-8AC1-500C247A036E

   

400

   

ScheduleList

636287a7-7f62-4a6e-9fcc-081f4672cbf8

Manage Resources

 

401

   

FCGroupsList

08386d3d-7cc0-486b-a730-3b4cfe1b5509

Resources - Group Work Site

Facility

402

Y

STS_List_Facility

FacilityList

58160a6b-4396-4d6e-867c-65381fb5fbc9

Whereabouts - Group Work Site

Whereabouts

403

Y

STS_List_Whereabouts

WhereaboutsList

9c2ef9dc-f733-432e-be1c-2e79957ea27b

Phone Call Memo - Group Work Site

CallTrack

404

Y

STS_List_CallTrack

CallTrackList

239650e3-ee0b-44a0-a22a-48292402b8d8

Circulations - Group Work Site

Circulation

405

Y

STS_List_Circulation

CirculationList

a568770a-50ba-4052-ab48-37d8029b3f47

Timecard (hidden) - publishing

Timecard

420

H

STS_List_TimeCard

TimeCardList

d5191a77-fa2d-4801-9baf-9f4205c9e9d2

 

Holidays

421

?

 

HolidaysList

9ad4c2d4-443b-4a94-8534-49a23f20ba3c

  .

425

?

 

WhatsNewList

d7670c9c-1c29-4f44-8691-584001968a74

StatusIndicatorList / KPIs

 

432

 

STS_List_432

BizAppsListTemplates

065c78be-5231-477e-a972-14177cc5b3c7

Report Library

 

433

 

STS_List_433

ReportListTemplate

2510D73F-7109-4ccc-8A1C-314894DEEB3A

   

434

       

Dashboard content

 

450

 

STS_List_450

PPSWorkspaceList

481333E1-A246-4d89-AFAB-D18C6FE344CE

Data Sources - Performance Point

 

460

 

STS_List_460

PPSDatasourceLib

5D220570-DF17-405e-B42D-994237D60EBF

   

470

 

1

BICenterDataconnectionsLib

26676156-91A0-49F7-87AA-37B1D5F0C4D0

Dashboards

 

480

 

STS_List_480

BICenterDashboardsLib

F979E4DC-1852-4F26-AB92-D1B2A190AFC9

Microsoft IME Dictionary List

IMEDic

499

N?

 

IMEDicList

1c6a572c-1b58-49ab-b5db-75caf50692e6

Categories - community site

 

500

Y

STS_List_500

CategoriesList

D32700C7-9EC5-45e6-9C89-EA703EFCA1DF

   

505

   

VisioProcessRepository

7E0AABEE-B92B-4368-8742-21AB16453D01

Visio Repository Site Process Diagrams

 

506

Y

STS_List_506

VisioProcessRepositoryUs

7E0AABEE-B92B-4368-8742-21AB16453D02

   

530

   

ContentFollowingList

A34E5458-8D20-4C0D-B137-E1390F5824A1

MicroBlogList (MicroFeed)

 

544

Y

STS_List_544

MySiteMicroBlog

EA23650B-0340-4708-B465-441A41C37AF7

SocialDataStoreList

 

550

   

SocialDataStore

FA8379C9-791A-4FB0-812E-D0CFCAC809C8

 

ExternalList

600

Y

 

ExternalList

00bfea71-9549-43f8-b978-e47e54a10600

My Site Documents

MySiteDocumentLibrary

700

 

STS_List_MySiteDocumentLibrary

MySiteDocumentLibrary

E9C0FF81-D821-4771-8B4C-246AA7E5E9EB

Product Catalog

 

751

 

STS_List_751

   

Pages Library

Pages

850

Y

STS_List_850

Publishing

22A9EF51-737B-4ff2-9346-694633FE4416

Asset Library

 

851

Y

STS_List_851

AssetLibrary

4BCCCD62-DCAF-46dc-A7D4-E38277EF33F4

Channel Settings

 

852

Y

STS_List_852

   

Hub Settings

 

853

Y

STS_List_853

   

Members - community site

 

880

Y

STS_List_880

MembershipList

947AFD14-0EA1-46c6-BE97-DEA1BF6F5BAE

for community site

 

925

   

AbuseReportsList

C6A92DBF-6441-4b8b-882F-8D97CB12C83A

Issue Tracking List

IssueTracking

1100

Y

STS_List_IssueTracking

IssuesList

00bfea71-5932-4f9c-ad71-1557e5751100

 

AdminTasks

1200

       
 

HealthRules

1220

       
 

HealthReports

1221

       

DraftAppsListTemplate

DeveloperSiteDraftApps

1230

Y

STS_LIST_DeveloperSite
DraftApps

Developer

E374875E-06B6-11E0-B0FA-57F5DFD72085

TransMgmtLib

Translation Management Library

1300

   

TransMgmtLib

29D85C25-170C-4df9-A641-12DB0B9D4130

xlatelist

Languages & Translations

1301

   

TransMgmtLib

29D85C25-170C-4df9-A641-12DB0B9D4130

   

1302

   

InPlaceRecords

DA2E115B-07E4-49d9-BB2C-35E93BB9FCA9

EDiscoverySources

 

1305

Y

STS_List_1305

EDiscoveryCaseResources

E8C02A2A-9010-4F98-AF88-6668D59F91A7

EDiscovery Source Instances

 

1306

H

 

EDiscoveryCaseResources

E8C02A2A-9010-4F98-AF88-6668D59F91A7

EDiscovery Source Groups / Sets

 

1307

Y

STS_List_1307

EDiscoveryCaseResources

E8C02A2A-9010-4F98-AF88-6668D59F91A7

EDiscovery Custodians

 

1308

Y

STS_List_1308

EDiscoveryCaseResources

E8C02A2A-9010-4F98-AF88-6668D59F91A7

Custom Lists / Queries

 

1309

Y

STS_List_1309

EDiscoveryCaseResources

E8C02A2A-9010-4F98-AF88-6668D59F91A7

EDiscovery Exports

 

1310

Y

STS_List_1310

EDiscoveryCaseResources

E8C02A2A-9010-4F98-AF88-6668D59F91A7

   

2000

   

PhonePNSubscriber

41E1D4BF-B1A2-47F7-AB80-D5D6CBBA3092

   

2001

   

ExternalSubscription

5B10D113-2D0D-43BD-A2FD-F8BC879F5ABD

Slide Library

 

2100

Y

STS_List_2100

SlideLibrary

0BE49FE9-9BC9-409d-ABF9-702753BD878

AccSrvAddApp / Access App

 

3100

   

AccSvcAddAccessApp

D2B9EC23-526B-42C5-87B6-852BD83E0364

wfsvc

 

4501

   

WorkflowServiceStore

2C63DF2B-CEAB-42c6-AEFF-B3968162D4B1

Acquisition History List

 

10099

 

STS_List_10099

   

Please don't just copy and paste this into another blog! The person who said "plagiarism is the sincerest form of flattery" did not do all of the work!. Feel free to reference this Tech Training Notes article as a source of this information.

.Additional Notes:

  • Not all lists are available in all sites. The available lists depend on the template and enabled features.
  • Not all of the lists can be created in SharePoint 2013, at least without using code or PowerShell. Many of these lists are “deprecated” and are only still supported for upgrades from older SharePoint versions.

 

.

2/04/2015

SharePoint Dev Class 20488 in Two Weeks

 

I'll be presenting the 20488 Developing Microsoft SharePoint Server 2013 Core Solutions class in two weeks, actually a week and a half (time flies!). February 16th, 2015. We've set up this class for both local and remote students. Online students will be able to view the class and have remote access to the lab computers.

Just as a little incentive, when you register enter my code of "TTN50" and get a $50 discount on the class.

Details here: http://www.maxtrain.com/Classes/ClassInfo.aspx?Id=101693


MS-20488 Developing Microsoft SharePoint Server 2013 Core Solutions

In this 5 day instructor-led course, students learn core skills that are common to almost all SharePoint development activities. These include working with the server-side and client-side object models, developing and deploying features, solutions, and apps, managing identity and permissions, querying and updating list data, managing taxonomy, using workflow to manage business processes, and customizing the user interface.

At Course Completion

After completing this course, students will be able to:

  • Design and manage features and solutions.
  • Develop code for custom server-side components.
  • Manage and customize authentication and authorization.
  • Create custom sites and lists and manage the site lifecycle.
  • Explain the capabilities and design choices for SharePoint apps.
  • Use the client-side object model and the REST API.
  • Develop provider-hosted and auto-hosted SharePoint apps.
  • Distribute and deploy SharePoint apps.
  • Create custom workflows to automate business processes.
  • Use fields and content types to manage taxonomy.
  • Customize the appearance and behavior of user interface elements.
  • Customize navigation and site branding.

More details at http://www.maxtrain.com/Classes/ClassInfo.aspx?Id=101693

 

.

9/04/2014

When is Full Control not Full Control

 

This article has three possible titles:

  • All Full Control Users are not able to see the Access Requests Link and Page
  • When is Full Control not Full Control?
  • All About Associated Groups!

 

The problem: You have a user who has Full Control, but who is not a member of the Site Owners group.

Shouldn't they be able to do anything a member of the Owners group can do? Turns out they cannot see the "Access Requests" link in Site Permissions page.

Members of the Site Owners group see:

image

While the Full Control only user sees:

image

(Just typing "Full Control only user" is weird!  "Only" has Full Control?)

 

So who can see the Access Requests Link?

Two groups of people:

  • Site Collection Administrators
  • Members of the site's associated Owners Group

Notice that "users with Full Control" is not in that list, and that the word "associated" is in there.

 

Three Magic Groups

You can create many "owners" groups and give them all Full Control and they still won't be able to see the Access Requests link. The magic owners group must be "associated" to a special property. The SharePoint web site (the SPWeb object) has three properties that identify the three default special groups: AssociatedMemberGroup, AssociatedOwnerGroup and AssociatedVisitorGroup. The group associated with the AssociatedOwnerGroup gets the "magic sauce" to let its users see the Access Requests link!

SharePoint 2007 had a nice option in the People and Groups page to set the associated groups:

image

To set the associated groups in SharePoint 2010, 2013 and Office 365 you will have to visit the page that's normally displayed when you create a new subsite with unique permissions; http://yourserver/sites/yoursite/_layouts/permsetup.aspx. This page has the title of "Set Up Groups for this Site". Here you can select from existing groups or create new groups and associate them to the three "magic groups".

image

An interesting side effect of the above page it when you add an owners group that does not have Full Control this page gives the group Full Control.

 

How to set the associated groups using PowerShell:

$web = Get-SPWeb "http://buckeyespug.maxsp2013.com";
$groups = $web.SiteGroups;
$group = $groups.GetByName("The New Owners Group");
$web.AssociatedOwnerGroup = $group;
$web.Update();

 

A C# version:

SPSite site = new SPSite("http://buckeyespug.maxsp2013.com");
SPWeb web = site.RootWeb;
SPGroupCollection groups = web.SiteGroups;
SPGroup group = groups.GetByName("The New Owners Group");
web.AssociatedOwnerGroup = group;
web.Update();

 

And for non-Developers

Visit the http://yourserver/sites/yoursite/_layouts/permsetup.aspx page!

 

Another way?

According to this article you can also directly grant permissions to the Access Requests lists. (The list won't exist until you have your first access request created.)

http://rwcchen.blogspot.com/2013/10/sharepoint-2013-update-access-requests.html

 

Auto-create the default groups

If you want to create the three default groups automatically call the SPWeb.CreateDefaultAssociatedGroups method, or if you are not a developer just visit the http://yourserver/sites/yoursite/_layouts/permsetup.aspx page.

.

2/17/2014

SharePoint 2013 and Office 365: Finding GUIDs

 

Years ago I wrote a little article on how to find SharePoint GUIDs for SharePoint 2007. Later I wrote one on how to find the same GUIDs using PowerShell.

Now, here's how to find GUIDs for just about anything using SharePoint 2013's REST web services! The following will work for both on premises and SharePoint Online / Office 365.

---

SharePoint 2013 includes a REST service to access sites, lists and items. In the data that's returned is an ID that is the GUID for the item.

Accessing REST is quite easy as you only need to type it into the address bar of your browser! REST does not work around security, so you will still need to authenticate to your site.

In the examples below "yourdomain" will of course be replaced with your domain name. If using Office 365 it might look like "http://companyname.sharepoint.com.

If you get a result that looks like this…

    image

… you can either use the View Source feature of the browser to see the XML or change the way the browser displays XML. For Internet Explorer:  Tools, Internet Options, Content tab, Feeds and Web Slices Settings and then uncheckmark "Turn on feed reading view",

 

Getting the GUID for your subsite (and a lot more…)

Visit your site, login and then edit your URL to look like this:

https://yourdomain.sharepoint.com/sites/yoursite/yoursubsite/_api/web

Scroll down to the content section and look for the ID element.

image

 

For other objects… sites, lists, items, fields, users…

See the references at the end of this article for even more examples.

The current site collection:
    /_api/Site

Web and Site Features and their GUIDs:
    /_api/web/Features
    /_api/site/Features

 

Lists:
    /_api/web/Lists

A single list (by name):
    /_api/web/Lists/getbytitle('tasks')

A single list (by GUID):
    /_api/web/Lists(guid'c61dc1a2-4982-4dc8-9d78-603d83d81940') (of course using your list's GUID!)

All list items:
    /_api/web/Lists/getbytitle('tasks')/items

A single list item:
    /_api/web/Lists/getbytitle('tasks')/items(12)   (Item with the ID of 12)

List items by criteria:
    /_api/web/Lists/getbytitle('tasks')/items?$filter=Status eq 'Not Started'

 

All list columns, including both display name and internal name!
    /_api/web/Lists/getbytitle('tasks')/Fields

Especially note these two elements:
    <d:InternalName>PercentComplete</d:InternalName>
    <d:Title>% Complete</d:Title>

The current user:
    /_api/web/CurrentUser (No GUID here, but there are other goodies!)

 

There's a lot more that you can do with SharePoint 2013's REST services!

.

1/12/2014

Why use InfoPath?

 

Update 1/31/14: InfoPath 2013 is the last InfoPath!


 

I'm surprised how often people in my SharePoint end user and developer classes don't know what InfoPath is, or if they do, where it can be used in SharePoint. Any discussion of InfoPath leads to a discussion of the future of InfoPath and if it is going away, what the alternatives are. What follows are some of my class notes…

A brief history of InfoPath

  • Formally named XDocs and NetDocs (*)
  • A patented way of authoring XML using DHTML views and XSLT (*)
  • Released in 2003 as part of Microsoft Office Professional 2003
  • Versions: 2003, 2007, 2010, 2013 (matching the releases of Office)
  • Started getting a lot of attention with the release of InfoPath Forms Services with the Enterprise Edition of MOSS 2007

 

InfoPath can be used:

  • To create custom stand alone forms. InfoPath templates can used as library or Content Type templates. When the user submits the form the data can be saved back to a SharePoint library as an XML file or to other destinations such as email or network shares. In SharePoint, saved data is often then processed using workflows to approve the content or to use the data to update other lists or external systems. (The XML format is easy for developers to work with.)
  • To create custom forms for lists. These forms save their data back into a SharePoint list, not as an XML file, but as a list item with the data saved as item properties/columns.
  • To create workflow forms in both SharePoint Designer and Visual Studio workflows. (But SharePoint 2013 workflows only create ASPX forms.)

 

Reasons to use InfoPath:

  • Rich editor to create a form that can look like anything you want.
  • Rules based business logic to hide, show, format and validate fields.
  • External connectivity to offer dropdown lists populated from SharePoint lists, SQL server and many other sources.
  • While a forms designer needs a licensed copy of InfoPath, the end user only needs a web browser. Users do not need any InfoPath product or version if the forms are hosted in the Enterprise Edition of SharePoint 2007, 2010 or 2013.
  • Lots of resources are available: classes, books, blog articles, videos
  • No knowledge of JavaScript, jQuery, XML HTML or CSS needed to create custom forms and custom validation.
  • Multiple views of data. Example: A user might see 50 fields when filling out the form. The approvers might see a 10 field summary and after approval or rejection the user might only see 2 fields and a comments field.
  • Optional bidirectional data (edit a property in the InfoPath form and it updates in the library metadata, edit library metadata and it updates in the InfoPath form - great for workflows!)

 

Reasons not to use InfoPath

  • Yet another tool to learn
  • Unknown future - InfoPath 2013 is largely unchanged from 2010 and SharePoint Designer 2013 workflows only create ASPX forms.
  • There are 3rd party solutions for forms design in SharePoint
  • You must have the Enterprise Edition of SharePoint, otherwise every user must own InfoPath

 

Benefits unique to developers:

  • Much less work to create Initiation, Association and Task forms for Visual Studio workflows
  • Much less work to customize SharePoint Designer workflow forms
  • Everything is XML!
  • No JavaScript, HTML, etc...

 

Disadvantages to developers:

  • We like to write code!
  • There's always something that we want to do that InfoPath can't do but we can do by writing more code.
  • Yet another tool to learn.
  • There's always a better tool somewhere.
  • Need to buy at least one copy of InfoPath.

 

Interesting comments by others…

Andrew Connell says "I do not use InfoPath any more & I do not recommend people use InfoPath going forward." http://www.andrewconnell.com/blog/my-thoughts-infopath-2013-the-future-of-infopath Read all of the comments!

The Office SharePoint blog: "InfoPath is our integrated forms solution for the foreseeable future"
Options to Create Forms in SharePoint 2013 http://blogs.office.com/b/sharepoint/archive/2013/03/04/options-to-create-forms-in-sharepoint-2013.aspx 

MSDN: "In this release, InfoPath 2013 has not introduced new functionality or scenarios."
http://msdn.microsoft.com/en-us/library/office/jj229830.aspx#odc_off15_ta_WhatsNewforO15Developers_InfoPath 

Glen Furnas at sharepoint-community.net: "Simply put, InfoPath is a multi-purpose product that’s been put to use in a wide variety of ways, and no single alternative will ever replace it in all its roles."
http://sharepoint-community.net/profiles/blogs/alternatives-to-infopath-exploring-the-options

Owen Runnals: "In the end I feel custom ASPX pages are the safest bet since they've worked since SharePoint 2007."
http://owenrunnals.blogspot.com/2013/01/the-future-of-custom-forms-in.html

 

Alternatives to InfoPath?

ASPX Forms

maybe Microsoft LightSwitch: http://msdn.microsoft.com/en-us/library/vstudio/jj969620.aspx

Microsoft Access 2013 / Access Apps (but no workflow support)

Nintex Forms: http://www.nintex.com/en-US/Products/Pages/NintexForms.aspx

K2 smartforms: http://www.k2.com/platform/formshttp://www.k2.com/blog/k2-smartforms-vs-microsoft-infopath

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.