Skip Ribbon Commands
Skip to main content
SharePoint

Kevin Hughes

December 07
Custom Search Solution – Part 6

This is the Part 6 in a multi-post series where we explore a custom Enterprise Search solution I designed for one of my clients.

In Part 1, I described the series, the client environment, an overview of the project requirements and presented an overview of the implementation steps.

In Part 2, we looked at implementing Managed Metadata Configuration to standardize metadata used in various document libraries.

Part 3 includes the design and provisioning of a Content Type Hub to allow the centralized management of the content types used in multiple site collections.

In Part 4 we covered Step 3 - Create an Enterprise Search Center which outlined the creation of a centralized search site which will allow search results from multiple site collections to be displayed and refined in the same location.

In Part 5 we cover Step 4 - Configure Site Collections which describes the steps to configure the different site collections to be able to consume and use the content types published from the Content Type Hub.

In Part 6, we cover Step 5 – Configure Search

This is the last step in the solution and the last article in this series.

This step outlines the steps necessary to configure SharePoint Search and Search components in order to be able to display search results as desired and in specific formats as required.

Once the content types have been added to document libraries, the new managed properties will be available in the Search Schema. At this time we will verify they are present and retrieve their Managed Property Name as assigned by SharePoint. We will also verify the individual properties of each Managed Property to insure they are available for further operations.

  1. Verify the properties of the new Managed Properties

These are created from the site columns and content types in the Content Type Hub.

You will need to navigate to the Central Administration site for your SharePoint Farm.

Then Navigate to Application Management > Manage Service Applications > Search Service Application > Queries and Results > Search Schema.

In the Filter box named "Managed Property" type in the names of the new managed properties. The list of these properties is below along with the likely actual name of the managed property. Confirm these names before proceeding.

   

Custom Column Name

Managed Property Name

Product Line

owstaxIdProductx0020Line

Language

LanguageOWSCHCS

Market Segment

owstaxIdMarketx0020Segment

Bulletin Category

owstaxIdBulletinx0020Category

Document Type

owstaxIdDocumentx0020Type

DocTypeCode

owstaxIdDocTypeCode

Content Type

ContentType

Product Name

ProductNameOWSTEXT

Product Number

ProductNumberOWSTEXT

NIC Code

owstaxIdNICx0020Code

Language Code

owstaxIdLanguagex0020Code

Bulletin Title

BulletinTitleOWSTEXT

Document Description

DocumentDescriptionOWSMTXT

Document ID

DocumentIDOWSNMBR

Region

owstaxIdRegion

Country

owstaxIdCountry

Brand

owstaxIdBrand

Entry Date

EntryDateOWSDATE

File Format

FileFormatOWSCHCS

Published Date

PublishedDateOWSDATE

Version Date

VersionDateOWSDATE

Version Number

VersionNumberOWSNMBR

   

 "Edit" each managed property and confirm that the boxes are checked for:

  • Searchable
  • Queryable
  • Retrievable

    Also verify that these properties are set to "Yes - Active".

  • Refinable
  • Sortable

    Run a Full Crawl

   

  1. Configure the Display Template

In order to display the required custom properties in the search results, it is necessary to customize the Search Display Template named Item_Default.html. This template will be present in the new Search site collection which was created in previous steps. Navigate to the Search site settings to perform the following steps.

  1. Display Template

The display template defines what we want our results to look like.

  1. From the Site Settings page, select Master pages and page layouts from the Web Designer Galleries section
  2. Select Display Templates and then Search
  3. Locate Item_Default.html and create a copy by selecting Download a Copy from the item dropdown menu.

This will make a copy of the file that we will be customizing in case there are issues and the customized file need be replaced by the original.

   

  1. Open site in SharePoint Designer 2013 and navigate to All Files > _catalogs > masterpage > Display Templates > Search

   

  1. Select Item_Default.html from the list and then select Edit file.
  2. Check out the Item_Default.html file. Then edit the file.
  3. Add additional fields to be displayed (Comments and PublishingRollupImage) as follows:

<mso:ManagedPropertyMapping msdt:dt="string">'Title':'Title','Path':'Path','Description':'Description',
'EditorOWSUSER':'EditorOWSUSER','LastModifiedTime':
'LastModifiedTime','CollapsingStatus':'CollapsingStatus',
'DocId':'DocId','HitHighlightedSummary':
'HitHighlightedSummary','HitHighlightedProperties':
'HitHighlightedProperties','FileExtension':'FileExtension',
'ViewsLifeTime':'ViewsLifeTime','ParentLink':'ParentLink',
'FileType':'FileType','IsContainer':'IsContainer',
'SecondaryFileExtension':'SecondaryFileExtension','DisplayAuthor'
:'DisplayAuthor','
owstaxIdProductx0020Line':'owstaxIdProductx0020Line',
'
LanguageOWSCHCS':'LanguageOWSCHCS','LanguageOWSCHCS':'LanguageOWSCHCS',<ENTER OTHER PROPERTIES HERE USING THE SAME FORMAT>
</mso:ManagedPropertyMapping>

   

Example:

   

  1. Inside the second <div> tag in the <body>, use the following syntax to add code that will display the value of the custom managed property:

_#= ctx.CurrentItem.<Current item property name> =#_

   

Example:

   

   

  1. Save changes to Item_Default.html.
  2. Create a custom CSS file called CustomDisplayTemplate.css and add styles to make the text display as you wish.
  3. Add a link to CustomSearchDisplayTemplate.css in the <head> of Item_Story.html.
  4. Save, check in, and publish all files as necessary.

 

At this point, custom refiners can be configured in the Search Site Collection if desired. This series will not cover the creation of these.

Security

Security in the Search Site Collection should be based on three standard levels with exceptions as required. Each level will be designated with a SharePoint Group. Permissions are assigned to these groups as follows:

Group Name

Permissions

Members

Portal Owners

Full Control of Site

SharePoint Team

Portal Members

Contribute (R/W/D)

None

Portal Visitors

Read

All Users

 

Thank you for following along in this series. I hope to explore more real-world examples of implementation of SharePoint in the future.

December 07
Custom Search Solution – Part 5

This is the Part 5 in a multi-post series where we explore a custom Enterprise Search solution I designed for one of my clients.

In Part 1, I described the series, the client environment, an overview of the project requirements and presented an overview of the implementation steps.

In Part 2, we looked at implementing Managed Metadata Configuration to standardize metadata used in various document libraries.

Part 3 includes the design and provisioning of a Content Type Hub to allow the centralized management of the content types used in multiple site collections.

Part 4 we covered Step 3 - Create an Enterprise Search Center which outlined the creation of a centralized search site which will allow search results from multiple site collections to be displayed and refined in the same location.

In Part 5, we cover Step 4 - Configure Site Collections

This step describes the steps to configure the different site collections to be able to consume and use the content types published from the Content Type Hub.

To use the content types from the content type hub just created, the content types must be subscribed.

   

  1. Published Content Types

After running the timer jobs, the content types should be published.

Navigate to your DS and SDS site collections.

Go to Site Settings > Site Collection Administration > Content Type Publishing.

   

   

If there are no content types listed, check the Refresh all Published Content types on next update and say OK. Have the SP Admin check the status of the Timer Jobs and, if necessary, rerun them.

   

  1. Verify the Content Types

In both site collections navigate to Site Settings > Web Designer Galleries > Site Content Types

Scroll down to see if the content types are listed in the Nalco group.

   

   

   

You will find if you click on these content types, they are set to Read Only. This is by design. They may only be changed via the Content Type Hub. However, you may still configure the settings for workflow, Information Management Policies, and etc.

   

Whenever changes are made to the content types in the content type hub, remember to "Republish" them. They will be updated the next time the Timer Jobs run. This is daily, by default, but may be changed by the SP Admin.

   

  1. Add the content types to the Document Libraries

The same steps are used for all three of the document libraries to which the new content types will be added.

Navigate to the Product Documents document library (and then to the Product Bulletins and Safety Data Sheets libraries).

   

Open the Library Settings.

Under General Settings, click on Advanced Settings.

Under Content Types > Allow management of content types?

Choose YES.

Click OK.

   

   

Back in the Library Settings, a new section has been added above the columns - Content Types.

   

   

Click "Add from existing site content types".

Choose the Nalco group.

Add the Product Document (or the other content types for the other libraries).

   

   

The content type has now been added to the library.

We will also now see that the columns from our content type have been added to the library.

   

   

   

Now we change the button order and default content type for the library.

Click on "Change new button order and default content type".

Uncheck the box for "Document".

Change the position of Product Document to "1".

 

   

Note that the "Document" content type can NOT be removed.

   

You may now upload documents, create/configure views as needed.

   

When uploading a document to the library, the user will be prompted to enter the metadata unless the "Drag-n-drop" method is used for upload operations.

   

   

   

Note that these steps must be performed before any custom properties will be available to use as Search refiners.

   

 

We continue in the next article with Step 5 – Configure Search.

 

December 07
Custom Search Solution – Part 4

This is the Part 4 in a multi-post series where we explore a custom Enterprise Search solution I designed for one of my clients.

In Part 1, I described the series, the client environment, an overview of the project requirements and presented an overview of the implementation steps.

In Part 2, we looked at implementing Managed Metadata Configuration to standardize metadata used in various document libraries. Part 3 includes the design and provisioning of a Content Type Hub to allow the centralized management of the content types used in multiple site collections.

In Part 4, we cover Step 3 - Create an Enterprise Search Center

This step will outline the creation of a centralized search site which will allow search results from multiple site collections to be displayed and refined in the same location.

  1. Create a new Managed Path for the intranet.NALCO.com web application.
  2. Navigate to Central Administration

  3. Navigate to Application Management > Web Applications > Manage Web Applications

  4. Choose the portal.cloudrk.net web application.

  5. Click on the Managed Paths button in the ribbon.

  6. Create a new Managed Path with the following values:

   

  • Path: Search
  • Type: Explicit inclusion

   

   

   

   

Create a new site collection for the search center

Navigate to Application Management > Site Collections > Create Site Collections

Choose the web application http://intranet.NALCO.com

Title: Search

URL: http://intranet.NALCO.com/search

Template Selection:

Select experience version: 2013

Select a template: Enterprise Tab > "Enterprise Search Center"

Primary Site Collection Administrator:

Secondary Site Collection Administrator: NALCO\sjones

   

   

   

   

   

We continue in the next article with Step 4 – Configure Site Collections

December 07
Custom Search Solution – Part 3

This is the Part 3 in a multi-post series where we explore a custom Enterprise Search solution I designed for one of my clients.

In Part 1, I described the series, the client environment, an overview of the project requirements and presented an overview of the implementation steps.

In Part 2, we looked at implementing Managed Metadata Configuration to standardize metadata used in various document libraries.

In Part 3, we cover Step 2 - Create and Configure a Content Type Hub

This step shall include the design and provisioning of a Content Type Hub to allow the centralized management of the content types used in multiple site collections.

SharePoint supports accessing content types from one site collection to another site collection through content type hub. In these steps we will set up a Content Type Hub (which is a part of the Metadata Service Application), which is a hub for all Content Types that other Site Collections can subscribe to. That is you only need to manage your content types in one location.

  1. Create a new site collection for the Content Type Hub

  2. Navigate to Application Management > Site Collections > Create Site Collections

  3. Choose the web application http://intranet.NALCO.com

Title: Content Type Hub

URL: http://intranet.NALCO.com/sites/ContentHub

Template Selection:

Select experience version: 2013

Select a template: Collaboration > "Team Site"

Primary Site Collection Administrator:

Secondary Site Collection Administrator: NALCO\sjones

   

   

   

   

  1. Navigate to the Content Type Hub site collection features

Site Settings > Site Collection Administration > Site Collection Features

   

  1. Activate the feature "Content Type Syndication Hub"

   

   

   

   

  1. Create Site Columns for use in the new content types

 

Site Columns

  • Brand
  • Country
  • DocTypeCode
  • Document Type
  • Language (Should be a default Base Column)
  • Language Code
  • Market Segment
  • NIC Code
  • Product Line
  • Region
  • Category
  • Product Number
  • Product Name
  • Version Date
  • Version Number
  • Entry Date
  • Document Description
  • Document ID
  • File Format
  • Bulletin Title
  • Published Date

   

  1. Navigate to the Content Type Hub Site Settings

  2. Create a new site column: Site Settings > Web Designer Galleries > Site Columns and click on Create

 

Brand
  • Name: Brand
  • Type: Managed Metadata
  • Group: New Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > Brand term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

   

  1. Create Site Columns for the rest of the site columns using the same steps as above.

    Country

  • Name: Country
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > Country term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

   

   

DocTypeCode

  • Name: Country
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > DocTypeCode term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

   

   

Document Type

  • Name: Document Type
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > Document Type term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

   

   

   

   

   

Language Code

  • Name: Language Code
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > Language Code term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

   

 Market Segment

  • Name: Market Segment
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > Market Segment term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

NIC Code

  • Name: NIC Code
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > NIC Code term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

Product Line

  • Name: Product Line
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > Product Line term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

Region

  • Name: Region
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > Region term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

Category

  • Name: Bulletin Category (Must use a different name here because there is already a default Core Column called "Category" which is a single line of text.
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Multiple Value Field: Do not check
  • Display Format: Display term label in the field
  • Term Set Settings: In the window, choose the Nalco > Category term set
  • Allow Fill-in: No
  • Default Value: leave blank

   

   

   

   

   

Product Number

  • Name: Product Number
  • Type: Single Line of Text
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Default Value: leave blank

   

   

   

   

Product Name

  • Name: Product Name
  • Type: Single Line of Text
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Default Value: leave blank

   

   

Version Date

  • Name: Version Date
  • Type: Date and Time
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Date and Time Format: Date Only
  • Display Format: Friendly
  • Default Value: (none)

   

   

   

   

   

   

   

   

Version Number

Assuming you are not going to be tracking the actual version number and instead wish to manually enter the version number with each document.

  • Name: Version Number
  • Type: Number
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Minimum Allowed Value: 1
  • Maximum Allowed Value: leave blank
  • Number of decimal places: 0
  • Default Value: leave blank

   

   

   

   

   

Entry Date

  • Name: Entry Date
  • Type: Date and Time
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Date and Time Format: Date Only
  • Display Format: Friendly
  • Default Value: (none)

   

   

   

   

   

   

Published Date

  • Name: Published Date
  • Type: Date and Time
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Date and Time Format: Date Only
  • Display Format: Friendly
  • Default Value: (none)

    Document Description

  • Name: Document Description
  • Type: Multiple Lines of Text
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Allow unlimited length in document libraries: No
  • Number of Lines for Editing: 6
  • Type of Text: Enhanced rich text
  • Append Changes to existing text: No

   

   

   

 Document ID

Assuming you do not wish to use the Document ID Service to assign IDs to documents in the site collections (which can be used to retrieve items independent of their current location in the site collection).

  • Name: Document ID
  • Type: Managed Metadata
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Minimum & Maximum allowed values: Leave blank
  • Number of decimal places: 0
  • Default Value: leave blank

   

Bulletin Title

  • Name: Product Name
  • Type: Single Line of Text
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Default Value: leave blank

   

   

File Format

  • Name: File Format
  • Type: Choice
  • Group: Existing Group - Nalco
  • Description: Enter if desired
  • Required: No
  • Unique: No
  • Choices:
    • DOC
    • DOCX
    • XLS
    • XLSX
    • PDF
    • Any others you need to track
  • Display Choices using: Drop-down buttons
  • Allow "fil-in" choices: No
  • Default Value: Blank

   

   

   

   

   

   

  1. Create Content Types

    Navigate to Site Settings > Web Designer Galleries > Site content types

    Click Create

   

Content Types

  • Product Document
  • Product Bulletins
  • Safety Data Sheet

   

Product Document

  • Name: Product Document
  • Description: Enter if desired
  • Parent Content Type:
    • Select parent content type from: Document Content Types
    • Parent Content Type: Document
  • Group: New Group - Nalco

   

Configuration

Add columns to the content type.

   

   

   

   

Add from Existing Site Columns.
Choose the Nalco Group.
From available columns choose:
  • Brand
  • Document Type
  • Country
  • NIC Code

   

Choose the Base Columns Group
From available columns choose:
  • Language

   

Alter the column order:

   

   

   

   

   

   

   

Product Bulletins

  • Name: Product Bulletin
  • Description: Enter if desired
  • Parent Content Type:
    • Select parent content type from: Document Content Types
    • Parent Content Type: Document
  • Group: Existing Group - Nalco

   

   

Configuration

Add columns to the content type.

   

   

   

Add from Existing Site Columns.
Choose the Nalco Group.
From available columns choose:
  • Bulletin Title
  • Bulletin Category
  • Document Description
  • Market Segment
  • Product Line
  • Published Date
  • Version Number
  • Language

   

Choose the Base Columns Group
From available columns choose:
  • Language

   

   

   

   

Alter the column order:

   

   

   

   

   

Safety Data Sheet

  • Name: Safety Data Sheet
  • Description: Enter if desired
  • Parent Content Type:
    • Select parent content type from: Document Content Types
    • Parent Content Type: Document
  • Group: Existing Group - Nalco

       

       

       

       

       

    Configuration

    Add columns to the content type.

       

       

       

       

    Add from Existing Site Columns.

    Choose the Nalco Group.

    From available columns choose:

    • Document ID
    • File Format
    • Language Code
    • DocTypeCode
    • Product Name
    • Region
    • Entry Date
    • Version Date
    • Version Number
    • Country
    • Product Number

       

    Choose the Base Columns Group

    From available columns choose:

    • Language

       

       

       

    Alter the column order:

       

       

       

  1. Configure Managed Metadata Service for Content Type Hub publishing

  2. Log into Central Administration for your SP Farm.

  3. Navigate to Application Management > Manage Service Applications

  4. Click to HIGHLIGHT the Managed Metadata Service.

  5. Click the Properties button in the ribbon.

  6. Enter the full path URL to the site collection used for the Content Type Hub.

   

   

   

  1. Click to HIGHLIGHT the Managed Metadata Service Connection

  2. Click the Properties button in the ribbon.

  3. Check the box for "consumes content type from the content type gallery"

  4. Click OK.

   

   

   

   

  1. Publish the Content Type

  2. Navigate back in the Content Type Hub site.

  3. Choose each of the content types just created:

   

  • Product Bulletin
  • Product Document
  • Safety Data Sheet

   

  1. Click on Manage publishing for this content type.

  2. Click the button for "OK"

   

   

  1. Navigate back to Central Administration

    In order to receive the published content types immediately in the subscribers, you can go and run two timer jobs immediately: Go to Central Admin and run the timer jobs:

  • Content Type Hub
  • Content Type Subscriber (of the web application which is going to receive the content type's updates)

   

Your SP Admin should do this.

   

Also note that the content types and managed properties will not actually be retrievable until a full crawl is performed by the SP Admin.

 

 

We continue in the next article with Step 3 – Create an Enterprise Search Center

December 07
Custom Search Solution – Part 2

This is the 2nd in a multi-post series where we explore a custom Enterprise Search solution I designed for one of my clients.

In Part 1, I described the series, the client environment, an overview of the project requirements and presented an overview of the implementation steps. The company name we will use here is "NALCO". We will also reference the account name of the SharePoint Team Lead (fictional), Sandy Jones, as NALCO\sjones. Even though the requirements are that the Enterprise Search Solution be managed by Sandy Jones, who is NOT a Farm Administrator, the interaction with the Farm Administrator will be required for many of the actual steps. We hope to show how the ongoing maintenance can still be done by Sandy.

In Part 2, we begin Step 1 – Managed Metadata Configuration.

The first step in the solution is to standardize the terms used for the metadata that will be used in the document libraries for use as queryable and refinable terms.

The first step in implementing this solution will be to standardize the metadata used in the various document libraries. To do this we set up the global term sets. Follow the steps below in order to implement this standardization through Managed Metadata.

This step is performed primarily by a SharePoint Administrator with Farm Administrator permissions.

  1. In Central Administration

  2. Navigate to Application Management > Service Applications > Manage Service Applications > Managed Metadata Service

  3. In the section of Taxonomy Term Store create a new Group. It is named NALCO in this document, but may be named anything you wish.

   

   

   

  1. Grant NALCO\sjones permissions as Group Manager

  2. Create a new term set in the NALCO group

    Name: Brand

  3. Enter the language terms that should be in this term set

   

   

   

   

  1. Create a new Term set and add terms for the following:

  • Country
  • DocTypeCode
  • Document Type
  • Language Code
  • Market Segment
  • NIC Code
  • Product Line
  • Region

   

  1. Do not create a Term Set for Language. We will use the existing default site column for Language when we configure the Content Type Hub.

 

We continue in the next article with Step 2 – Create and Configure a Content Type Hub

December 07
Custom Search Solution – An example

I recently had a client that needed a custom Enterprise Search solution designed for their internal SharePoint Server 2013, Enterprise environment. Many of the tasks were a bit beyond the internal skillset of their internal SharePoint team, so I wrote up a set of instructions for them. I thought they might give others a good example of how to set up a coherent Enterprise Search solution. So, I this will be the first in a multi-post series using their environment requirements as an example. In part 1 of the series (this article) we will explore the client's environment and their requirements before diving into the solution I designed for them. In the next articles in the series we will cover the actual steps for implementation for the solution. All the screenshots are in a demo environment, not the actual client environment.

Description of the environment:

We will call the client National Company or NALCO for short. In a multi-tier SharePoint Server 2013, Enterprise environment, the client has multiple web applications, but only a single web application is considered for this solution. Within this web application, there are multiple site collections. Each site collection currently hosts one or more document libraries which are the primary document repositories used for business processes. Each of the document libraries has custom content-types associated with it and the content types have custom site columns as part of their schema. Many of the custom site columns are common in all the content types, but some of the similar ones are not based on the same data type – example: a date column in one content type is based upon the Date/Time data type and in another content type it is a Single Line of Text field. Managed Metadata has been configured at the Site Collection Scope in one or more site collections, but not at the Farm scope, which has the implication that the term sets are not available cross-site collections without compromising security. Additionally, some of the custom columns in the document libraries are not site columns, but only exist in that particular list.

To outline the needs of their solution:

  • Use an on-premises SharePoint Server 2013, Enterprise environment.
  • Need a Central Search site which will serve as a common search location and display all search results.
  • Centralize the management of metadata throughout the environment.
  • Centralize the management of content types throughout the environment.
  • Allow single place to display search results without compromising security in individual site collections.
  • Use only no-code methodologies. This does not prohibit the use of custom-designed components, only that they be manageable via the built-in interfaces and technologies (meaning only the SharePoint 2013 User Interface or SharePoint Designer 2013 and not include any "hard" code or third-party products).
  • The team implementing and managing the solution will not have Farm Administration permissions.
  • Aggregate search results of three document libraries from two different site collections into a single search result set.

Two of the document libraries are in a site collection called Document Storage or DS.

The other document library is in a site collection called Safety Data Sheets or SDS.

The DS site collection has document libraries named Product Documents and Product Bulletins. Here are screenshots of these document libraries to help understand their schema.

Overview of the Implementation Steps:

  • Step 1 – Managed Metadata Configuration – The first step in the solution is to standardize the terms used for the metadata that will be used in the document libraries for use as queryable and refinable terms.
  • Step 2 – Create and Configure a Content Type Hub –This step shall include the design and provisioning of a Content Type Hub to allow the centralized management of the content types used in multiple site collections.
  • Step 3 – Create an Enterprise Search Center – This step will outline the creation of a centralized search site which will allow search results from multiple site collections to be displayed and refined in the same location.
  • Step 4 – Configure Site Collections – This step describes the steps to configure the different site collections to be able to consume and use the content types published from the Content Type Hub.
  • Step 5 – Configure Search – This step outlines the steps necessary to configure SharePoint Search and Search components in order to be able to display search results as desired and in specific formats as required.

 

Reference the later articles to see the actual implementation steps.

 

October 19
SharePoint Web Part Hide & Seek

In this post we will explore a scenario where there is a requirement to have web parts on a SharePoint page that will appear and/or disappear with button clicks from the user. I had a client that required this functionality on an intranet page to show pictures of regional offices and as each picture was clicked, web parts would appear displaying the office address information, a Google map and an office staff list.

Here is what the page looked like when initially loaded by the user.

Here is what the page looks like when the picture for the Cambridge Office is clicked.

Notice that four web parts have appeared on the page. Three below the pictures and one above them. The one above is a standard rendering of a button in SharePoint 2013 that will hide all the "extra" web parts on the page so that it appears as it was on initial load. As the Philadelphia Office button is clicked, notice that the web parts have changed.

The page doesn't reload. The scroll bars don't change. The three web parts below the pictures are just "replaced" by new ones. So, here is how this was achieved.

First, a bit of overview of the technology we'll use.

  • Uses JavaScript to create the hide and show functions
  • Uses HTML to create buttons to call a CSS class which references JavaScript functions
  • Can be used with standard buttons or with images stored in SharePoint
  • May be used with any SharePoint web part(s)
  • May be used on any type of SharePoint layout page
    • Wiki
    • Article
    • Web Part
    • Blank aspx
  • Use Content Editor Web Parts (CEWP) to reference scripts
  • Works in SharePoint 2010 and 2013. Likely will work in SharePoint 2016 as well, but not tested.

The real secret of this effect is that all the web parts actually exist on the page at the same time. We're just going to use a bit of JavaScript legerdemain to hide or show web parts as we wish.

Assuming we have already prepared any lists and/or libraries we want to use we add all the web parts we will use to the page. Plus we'll add another hidden web part for our own use. Here are all the web parts we're adding to the page. Sorry for the small text, but this is with only a few web parts. Adding more will make the edit page even more complex. Also, remember that the more web parts you add to a page for this functionality the longer the page will take to render. And if the web parts contain large amounts of information, rely on external connections, display SSRS reports or BCS data then the page render time will also be increased. Be sure and test this extensively before you make your final decision on the design.

As you can see, for each office there is a web part with an address, a web part with a Google map and a web part with a staff list. While most of these are Content Editor Web Parts, they do not have to be. So, now let's take a look at the individual web parts.

The first web part on the page is actually the last one I recommend configuring. You can go ahead and add it to the page, but wait until after everything else is done before configuring it. For now, just add a CEWP to the top of the page and leave it there. Name it appropriately and hide the chrome.

Next we add our pictures. I inserted a table onto the page to make everything line up, but you can do this in web part zones, tables, or even DIV tables to make whatever layout you need. The pictures are actually CEWPs that reference JavaScript scripts stored in a text file. I store these files in the Site Assets library for the site, but they can be stored anywhere on the site that fits with your design.

Before we get to how to make it a picture button, go ahead and add the rest of the web parts to other cells in the table. If you want them all to look like they appear in the same "space" for the user, then don't put them in individual table cells and eliminate any extra line breaks or tags in between them.

The first ones I added were the address CEWPs. These are just text typed into the Rich Text area. Be sure and name them appropriately.

Then we add CEWPs to hold the Google maps. Again, we'll wait on referencing the scripts to render the maps, but go ahead and name them appropriately.

Next we add the List View web parts to display staff from a pre-created contacts list. These are just showing different filtered views of the list. Name them appropriately.

And lest we forget about the ability to hide all the extra web parts without having to refresh/reload the page, we add a CEWP to reset the page view. We will just be referencing a text file for this one, too. So, wait to do that, but go ahead and name it. Be sure and set this one to hide the chrome.

Now that we have all the web parts added to the page, let's get them all configured. First the picture buttons.

The script we will use for the pictures are the same for each picture, only differing in specifics. We are using a picture for the button created, but this is not necessary. These scripts are stored in text files that I edited in Notepad.

Philadelphia Picture Button

<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.min.js"></script>

<script type="text/javascript">

$(document).ready(function () {

 

$(".btnShowCambridgeCSSClass").click(function(){

     $('#MSOZoneCell_WebPartWPQ2').show(); //Rockville Pic

     $('#MSOZoneCell_WebPartWPQ3').show(); //Philadelphia Pic

     $('#MSOZoneCell_WebPartWPQ5').show(); //Cambridge Pic

     $('#MSOZoneCell_WebPartWPQ6').show(); //Cambridge Address

$('#MSOZoneCell_WebPartWPQ7').hide(); //Philadelphia Address

     $('#MSOZoneCell_WebPartWPQ8').hide(); //Rockville Address

     $('#MSOZoneCell_WebPartWPQ9').show(); //Cambridge Map

     $('#MSOZoneCell_WebPartWPQ10').hide(); //Rockville Map

     $('#MSOZoneCell_WebPartWPQ11').hide(); //Philadelphia Map

     $('#MSOZoneCell_WebPartWPQ12').show(); //Cambridge Staff

     $('#MSOZoneCell_WebPartWPQ13').hide(); //Rockville Staff

$('#MSOZoneCell_WebPartWPQ14').hide(); //Philadelphia Staff

$('#MSOZoneCell_WebPartWPQ15').show(); //Reset Button

});

});

</script>

 

<button type="button" name="Cambridge" class="btnShowCambridgeCSSClass"><img src="http://www.sharepointkevin.com/sites/sptest/SiteAssets/Cambridge%20Office%20Photo.gif" alt="Cambridge Office"/></button>

Philadelphia Picture Button

<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.min.js"></script>

<script type="text/javascript">

$(document).ready(function () {

 

$(".btnShowPhiladelphiaCSSClass").click(function(){

     $('#MSOZoneCell_WebPartWPQ2').show(); //Rockville Pic

     $('#MSOZoneCell_WebPartWPQ3').show(); //Philadelphia Pic

     $('#MSOZoneCell_WebPartWPQ5').show(); //Cambridge Pic

     $('#MSOZoneCell_WebPartWPQ6').hide(); //Cambridge Address

$('#MSOZoneCell_WebPartWPQ7').show(); //Philadelphia Address

     $('#MSOZoneCell_WebPartWPQ8').hide(); //Rockville Address

     $('#MSOZoneCell_WebPartWPQ9').hide(); //Cambridge Map

     $('#MSOZoneCell_WebPartWPQ10').hide(); //Rockville Map

     $('#MSOZoneCell_WebPartWPQ11').show(); //Philadelphia Map

     $('#MSOZoneCell_WebPartWPQ12').hide(); //Cambridge Staff

     $('#MSOZoneCell_WebPartWPQ13').hide(); //Rockville Staff

$('#MSOZoneCell_WebPartWPQ14').show(); //Philadelphia Staff

$('#MSOZoneCell_WebPartWPQ15').show(); //Reset Button

});

});

</script>

 

<button type="button" name="Philadelphia" class="btnShowPhiladelphiaCSSClass"><img src="http://www.sharepointkevin.com/sites/sptest/SiteAssets/Philadelphia%20Office%20Image.gif" alt="Philadelphia Office"/></button>

Rockville Picture Button

<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.min.js"></script>

<script type="text/javascript">

$(document).ready(function () {

 

$(".btnShowRockvilleCSSClass").click(function(){

     $('#MSOZoneCell_WebPartWPQ2').show(); //Rockville Pic

     $('#MSOZoneCell_WebPartWPQ3').show(); //Philadelphia Pic

     $('#MSOZoneCell_WebPartWPQ5').show(); //Cambridge Pic

     $('#MSOZoneCell_WebPartWPQ6').hide(); //Cambridge Address

$('#MSOZoneCell_WebPartWPQ7').hide(); //Philadelphia Address

     $('#MSOZoneCell_WebPartWPQ8').show(); //Rockville Address

     $('#MSOZoneCell_WebPartWPQ9').hide(); //Cambridge Map

     $('#MSOZoneCell_WebPartWPQ10').show(); //Rockville Map

     $('#MSOZoneCell_WebPartWPQ11').hide(); //Philadelphia Map

     $('#MSOZoneCell_WebPartWPQ12').hide(); //Cambridge Staff

     $('#MSOZoneCell_WebPartWPQ13').show(); //Rockville Staff

$('#MSOZoneCell_WebPartWPQ14').hide(); //Philadelphia Staff

$('#MSOZoneCell_WebPartWPQ15').show(); //Reset Button

});

});

</script>

 

<button type="button" name="Rockville" class="btnShowRockvilleCSSClass"><img src="http://www.sharepointkevin.com/sites/sptest/SiteAssets/Rockville%20Office%20Image.gif" alt="Rockville Office"/></button>

The first line of the scripts references an external jQuery file which could be stored internally, but does not have to be. In writing the rest of the script, we are creating a function that we will reference later. This function references the individual web parts on the page by ID and sets the display property on the web part to either hide or show it as the page is rendered. I add comments to each line so I can remember which web part is which as I write. We name the function .btnShowCambridgeCSSClass and then make sure to change that name for each picture so we know which one we are doing at the time. The last line is pretty standard HTML to create a button. We even assign a class to the button as if we were styling it. And we really are. We use the class to reference the JavaScript function we created above. The next thing is we add a reference to the picture we want to use. Be sure to upload your pictures to your SharePoint site before you complete this. Then copy the path and enter it here. If you don't want to use a picture, just eliminate the img tag code.

You may be wondering, though, how do we find which web part is which. Good question. We use our developer console in IE (or another browser if you really feel you must). Hit F12 while on the page and then we can find our web part ID.

Click on the DOM Explorer tab, then click on the Select Element button.

Once you have this selected, you next click on one of the web parts on your page to select it. I normally just hit the title.

When selected, the code displayed in the developer console will automatically scroll to the line for what you have selected. Then all you have to do is scroll to the top of the code for that web part.

In this line of code you will find the "id" property. This is the ID of the web part. You can copy and paste this into your script. Remember the name of the web part and add that to the comments in the script so you know you've gotten it. Repeat this with the other web parts on your page to get their IDs. Then all you have to do is determine which other web parts you want to show or hide when the button is clicked.

Once you have your first button created, save the file. Then copy and paste the code into the files for the other buttons. Change up the name of the function, the reference in the button class and then change the hide/show properties as you need.

As for the Reset View button, here is the code for it. You get the web part IDs for that the same way. It will hide all the web parts on the page except the three picture buttons.

Reset View Button

<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.min.js"></script>

<script type="text/javascript">

$(document).ready(function () {

 

$(".btnShowResetCSSClass").click(function(){

     $('#MSOZoneCell_WebPartWPQ2').show(); //Rockville Pic

     $('#MSOZoneCell_WebPartWPQ3').show(); //Philadelphia Pic

     $('#MSOZoneCell_WebPartWPQ5').show(); //Cambridge Pic

     $('#MSOZoneCell_WebPartWPQ6').hide(); //Cambridge Address

$('#MSOZoneCell_WebPartWPQ7').hide(); //Philadelphia Address

     $('#MSOZoneCell_WebPartWPQ8').hide(); //Rockville Address

     $('#MSOZoneCell_WebPartWPQ9').hide(); //Cambridge Map

     $('#MSOZoneCell_WebPartWPQ10').hide(); //Rockville Map

     $('#MSOZoneCell_WebPartWPQ11').hide(); //Philadelphia Map

     $('#MSOZoneCell_WebPartWPQ12').hide(); //Cambridge Staff

     $('#MSOZoneCell_WebPartWPQ13').hide(); //Rockville Staff

$('#MSOZoneCell_WebPartWPQ14').hide(); //Philadelphia Staff

$('#MSOZoneCell_WebPartWPQ15').hide(); //Reset Button

});

});

</script>

 

<button type="button" name="Reset" class="btnShowResetCSSClass">Reset View</button>

Upload the text files to your SharePoint Site Assets library.

At this point, all we have to do is edit the properties of our CEWPs and enter the path to the appropriate text files.

Save all the configurations for your web parts. At this point you'll have functioning buttons which will hide and show the web parts when you click the picture buttons or the reset view button. But, when the initial page loads you'll get all the web parts showing up. This is not what we really want. Which is where that first CEWP that we added to our page comes into play…the "Initial Load Hide Web Parts" web part. Remember that is a CEWP where we hide the chrome and so it will be a hidden web part when we reference a script. This script is a bit different than the ones for buttons because we want it to execute when the page is loaded, not on a button click. Here is that script.

Initial Load Hide Web Parts

<script type="text/javascript">

 

_spBodyOnLoadFunctionNames.push("hide");

 

function hide()

{

document.getElementById("MSOZoneCell_WebPartWPQ2").style.display='show'; //Rockville Pic

document.getElementById("MSOZoneCell_WebPartWPQ3").style.display='show'; //Philadelphia Pic

document.getElementById("MSOZoneCell_WebPartWPQ5").style.display='show'; //Cambridge Pic

document.getElementById("MSOZoneCell_WebPartWPQ6").style.display='none'; //Cambridge Address

document.getElementById("MSOZoneCell_WebPartWPQ7").style.display='none'; //Philadelphia Address

document.getElementById("MSOZoneCell_WebPartWPQ8").style.display='none'; //Rockville Address

document.getElementById("MSOZoneCell_WebPartWPQ9").style.display='none'; //Cambridge Map

document.getElementById("MSOZoneCell_WebPartWPQ10").style.display='none'; //Rockville Map

document.getElementById("MSOZoneCell_WebPartWPQ11").style.display='none'; //Philadelphia Map

document.getElementById("MSOZoneCell_WebPartWPQ12").style.display='none'; //Cambridge Staff

document.getElementById("MSOZoneCell_WebPartWPQ13").style.display='none'; //Rockville Staff

document.getElementById("MSOZoneCell_WebPartWPQ14").style.display='none'; //Philadelphia Staff

document.getElementById("MSOZoneCell_WebPartWPQ15").style.display='none'; //Reset Button

}

 

 

 

</script>

In this script we are still using JavaScript to create a function. But, the _spBodyOnLoadFunctionNames.push method calls the function called "hide" when the page is loaded and initially rendered. You'll also see that the code is just a bit different. Just remember that on initial load we are only setting the "show" property for the three picture buttons. Save that to a text file and upload it to your site's Site Assets library. Copy the path and then paste it into the Content Link section of the Initial Load Hide Web Parts web part properties.

Now when the page loads all the web parts except for the three picture buttons are hidden. You'll have to click on the pictures to get the other web parts to show up.

Remember that adding too many web parts in this way will slow down page rendering so the user experience will be diminished.

That's all there is to it.

Keep sharing!

May 01
Managing Large Lists in SharePoint 2013

Many of my clients have come to me with the same complaint, "I've only got 100,000 items in this list. Why is it so slow?"

When a list or library has a large number of items the performance of the list/library and possibly the container site will diminish. The default List View Threshold is 5000 items returned in a view. This Resource Throttling is to reduce the number of full table or full database locks in a content database. When item view quantity exceeds 5000 rows returned SQL will escalate a lock from row locks to table locks. This can vary according to the overall performance of the database at the time of the query and may be escalated to a full database lock if performance is low. This increases query time which increases page load time. The List View Threshold means that users will not be able to see any items beyond that threshold when they navigate to a view of the list/library.

While this List View Threshold can be increased so that users can see more items in a list, it is not recommended.

Consider creating indexed columns for the large lists. In general, an index on a column enables you to quickly find the rows you want based on the values in that column, even when working with millions of items.

Each additional column index will consume additional resources in the database and adds some overhead to every operation to maintain the index. Therefore, add indexes only to columns that will be used actively for filtering in views on the list or library.

Consider creating filtered views based on column indexes. For a view to quickly filter through a large number of items, the first column that you specify in the filter must be indexed. Other columns you specify in the view filter may or may not be indexed, but the view does not use those indexes. You also need to make sure that the first column of the filter does not return more items than the List View Threshold.

Consider management of the Recycle Bin. Items here are not actually deleted from the database and so are still considered part of the list index.

Consider using Search as an alternative to views. Because Search has its own indexing mechanisms, it is not subject to the List View Threshold or other related limits.

March 04
Typical Intranet Requirements

Many of my SharePoint clients use SharePoint as their primary Intranet. Often they also use it as an Extranet and sometimes for Internet public sites. I will describe their typical requirements, needs and desires for the Intranet functionality.

   

My typical client is organized along a fairly standard organizational hierarchy which separates corporate functions into geographic locations, divisions, departments, and teams of various sorts. They are often most comfortable with their Intranet architecture and taxonomy mirroring this organizational structure as closely as possible. Many deviate from this initial architecture to varying degrees over time, but most are very comfortable with it throughout the life of their Intranet.

   

There are a number of features and functions that are commonly requested among my SharePoint clients. Many of these are able to be implemented with Out of the Box (OOB) capabilities within SharePoint. Most of these common needs are fulfilled through configurations at the Web Application, Site Collection and Site scopes, however, quite a few are only available via global configurations at the SharePoint Farm scope.

   

Here is a list the most commonly requested features and functions.

 

  • Top-Level Portal Site - This is a site that acts as the client "Home Page" for their Web Browser client applications. Its primary function is information dissemination.
    • Initial Site Creation -
      • The Portal site is normally created as the top-level site in a site collection using a "Publishing" site template, usually "Enterprise Wiki".
    • Security -
      • Security is configured all company users to have READ permissions to this site and most all pages, lists and libraries. It will also extend to any elements in the Portal site collection which are intended for corporate-wide consumption.
      • A small team will have CONTRIBUTE permissions which may be limited to specific elements of responsibility.
      • An even smaller team or an individual is designated as site administrator and will have FULL CONTROL permissions. This level may, or may not, be inherited to sub-sites. It may include Site Collection Administrator permissions.
      • A "Farm Administrator" account (usually an account controlled by the IT department) is usually included in the Site Collection Administrator group to allow troubleshooting.
    • Content Approval -
      • Content on this site must be approved prior to being publically accessible. This usually involves not only requiring approval on the individual objects and pages, but also an automated approval workflow process and perhaps scheduled publishing of the content.
    • Navigation hub -
      • The Portal site contains Global navigational elements as well as contextual elements. The Global elements contain links to search, divisional/departmental sites, reporting, and other Business Intelligence locations.
      • There is also contextual navigation to link to sites, pages, and etc. that relate to the Portal and also those areas and items that are of cross-departmental or company-wide interest.
      • The Global navigational elements are usually required to be duplicated on all divisional/departmental site collections.
      • Specific Navigational Elements -
        • Top Nav Bar - Portal Home, Divisions/Departments, Search Center
          • Divisions/Departments will be a drop-down menu displaying the individual Divisions/Departments and may include Flyout menus to sub-elements.
        • Quick Launch Menu -
          • Employee List
          • Newsletter
          • Benefits
          • President/CEO/BOD/Executive Blog
          • Corporate Vision
          • Privacy Statement
          • Corporate Branding Guide
          • Job Postings
          • Employee Classifieds
          • Feedback
          • Glossary (corporate terminology and acronyms)
          • Help Desk ticket submission
          • Emergency Information
          • Conference Rooms
          • Corporate Performance and Projections
        • Quick Links Menu (Links List)
          • Internet Site
          • Extranet Site (if applicable)
          • Line of Business Systems links
          • Web Mail
          • Specific Intranet sites/pages of corporate-wide interest
          • Industry-specific external sites
    • Content -
      • The most common elements requested for content on a Portal site Welcome/Home page are:
        • Announcements
        • Corporate Calendar - which may sometimes aggregate calendars from the Division/Department Portals
        • Stock Ticker
        • Weather
        • Industry-specific news feed
        • New Employees
        • Employee Birthdays
        • Employee Anniversaries
        • Company Newsletter Articles
        • Personalized Links List
        • Message from President/CEO/BOD
        • Quick Links Menu
      • Other content in the Portal site collection
        • Announcements List
        • Corporate Calendar List
        • Employee Contact List
        • Company Officers/BOD focus page
        • Emergency Information Page
        • Enterprise Search Center
        • Newsletter archive Site or Document Library
        • Employee Classified advertisements List
        • Contact Us/ Feedback form
        • Pages/documents for corporate messages
        • President/CEO/BOD/Executive blog
        • Geographic Locations list/mapping (if applicable)
        • Building Maps
        • Conference Rooms Details list/page
        • Quick Links List
        • Glossary
        • Corporate Performance/Trending BI/Reporting Dashboard and supporting charts and Excel objects and pages
        • Library for Reports
        • Library for Excel spreadsheets
        • Library for Excel Data Connection objects
    • Customizations
      • The most often requested customizations relate to Branding. These include company logos, approved colors and fonts.
      • Often the navigational elements are required to use "Flyout" functionality either due to a desire to categorize like locations, to expose sub-elements, to reign-in extensively long amounts of navigational items at a particular level, or to satisfy "look and feel" requirements.
      • Many elements will require custom list views, Data View Web Parts, SP Workflows or third-party web parts to support required functionality.
      • Some functionality and customizations will require Custom Master Pages and Custom Style Sheets.

         

  • Divisional/Departmental Portals - these are most often created as site collections due to requirements for separate security models, delegated administration, and company cultural factors.
    • These portals are normally created as top-level sites in their own site collections. Most often the departmental portals will be created using a "Team Site" site template, but may be created with a "Publishing" site template if functionality from the "SharePoint Server Publishing Infrastructure" feature is required. When not using a Publishing site template, a standard custom site template may be created with common departmental features and installed at the Farm Scope to allow quick site collection deployment.
    • The departments most often with this particular need are Human Resources, Finance/Accounting, Information Technology and Executives/BOD.
    • Other divisions/departments are created in this same architecture/taxonomy for purposes of standardization.
    • Names for the Site Collections for use in the URL are usually commonly used company acronyms, while the site titles may or may not be full department names.
    • Security -
      • Security is configured all company users to have READ permissions to the departmental portal site and most all pages, lists and libraries. It will also extend to any elements in the departmental portal site collection which are intended for corporate-wide consumption.
      • Most, if not all, of the Departmental employees will have CONTRIBUTE permissions but may be limited to specific elements of responsibility.
      • An individual and a backup are normally designated as site administrators and will have FULL CONTROL permissions. This may also be inherited throughout the entire site collection (as per site collection administrator permissions).
      • Department Managers/Directors normally are NOT granted full control permissions, but are granted full READ access to all Departmental content.
      • A "Farm Administrator" account (usually an account controlled by the IT department) is usually included in the Site Collection Administrator group to allow troubleshooting.
    • Content Approval -
      • These sites do not normally require content approval. However, this may be required for individual elements that will be "published" for public consumption once approved.
    • Navigation -
      • Top Nav Bar - Departmental Sites will normally duplicate the Global Navigational elements from the Corporate Portal site. But, the items there may be supplemented by Department-global elements and locations.
      • Quick Launch Menu - These elements are very department-specific, so will include examples with the example departments below.
    • Content -
      • Will address examples of department-specific content in the department examples below.
      • The most common elements requested for content on a department portal site Welcome/Home page are:
        • Department Announcements
        • Department Calendar - which may sometimes aggregate calendars from team or function specific calendars or sub-sites
        • Department Manager Contact information
        • Important Contact information
        • Message from Manager/Director
        • Quick Links Menu
        • Important documents
      • Other content in the Department Portal site collection
        • Department Employee list
        • Management Focus page
        • Department Calendar
        • PTO Calendar - This will include a request form and approval workflow which may be a serial workflow. Is not normally publically accessible.
        • Announcements List
        • Manager's Blog
        • Departmental self-help knowledgebase - may include departmental glossary
    • Example Departments
      • Human Resources
        • Navigational Elements
          • Department Global Top Nav Bar
          • Quick Launch Menu
            • Benefits
            • Policies and Procedures
            • Employee Handbook
            • HRMS LoB system
            • Employee Surveys of various sorts
            • Position Descriptions
            • Careers / Job Postings
        • Department Portal
          • Welcome page with the standard departmental elements
          • Quick links list to HR specific pages or external sites
        • Specific content usually includes
          • Benefits sub-site which addresses
            • Healthcare
            • Insurance
            • Profit Sharing
            • Investments
            • PTO
            • Bonuses
            • Special programs
            • Provider Links
          • Policies and Procedures library (may be wiki or document library)
          • Surveys
          • Media Center
            • Required new-employee training videos
            • Required continuing education videos
          • Careers sub-site which addresses
            • Standardized job descriptions
            • Job postings
            • Application procedures
            • Hiring process
            • New hire request system
            • Job application system
          • Private working sites for
            • Employee on/off boarding
              • Includes automation to integrate with Information Technology, Finance, and Facilities
            • Policy development
            • Benefits research/planning
      • Information Technology
        • Navigational Elements
          • Department Global Top Nav Bar
          • Quick Launch Menu
            • Self-Help Knowledgebase
            • Instructional videos
            • Outage Calendar
        • Department Portal
          • Welcome Page with the standard departmental elements
          • Departmental Calendar will usually include Scheduled Outages and on-call schedule
        • Specific content usually includes
          • Help Desk sub-site
            • Issue Tracking/Ticketing system
            • Issue submission form
            • Self-Help knowledgebase
            • Help Desk staff technical knowledgebase
            • Help Desk procedures
          • Team/project sites - may or may not be private to internal IT or Team
            • Infrastructure
            • Databases
            • Messaging/telephony
            • Network
            • Development

 

Not all of these options are requested by all clients. And there are as many variations on this as there are clients. But, when gathering requirements or building demos, this list gives a good idea of what can make clients sit up and say YES!

 

Keep Sharing…

Kevin  

December 11
Bulk Import User Profile Photos to SharePoint 2013 from File Share

I had a recent client who was migrating to SharePoint 2013 from a non-SharePoint intranet. They wanted to use a new SharePoint 2013 intranet portal to replace many functions currently in the old intranet and also some other systems. They had been storing employee photos in a file share which had been referenced programmatically by their Human Resources Information System but this was not accessible by all employees. Through a complex bit of code, these had been referenced by their old intranet but it was slow and not easily searchable. They wanted to use SharePoint 2013 MySites to contain company-wide employee information which was searchable and accurate. Getting the rest of the requirements is outside the scope of this article. However, the big issue was not really the creation of the user profiles in SharePoint 2013, nor the import of user data from both Active Directory and their HRIS. It was how to get their employee pictures (over 4000 employees) into the new user profiles. Of course it could be done manually, but that's a lot of work. And since the HRIS was where they initially captured the employee picture new photos would always be placed in the file share. So, we needed a way to be able to repeat the import as part of a regular onboarding process.

Enter our old friend PowerShell.

Using a PowerShell script, we were able to reference a .csv file which contained necessary information to create a repeatable import process. The .csv file was created by their HRIS, but could be created in other ways for different scenarios. For this article, the format of the .csv file was:

domain_user_name

path

email

aalejandro

file://Network_Share/Marketing/EmployeePhotos/Axel00049.jpg

AXEL.ALEJANDRO@DomainName.Com

aanderson

file://Network_Share/Marketing/EmployeePhotos/Addie00532.jpg

ADDIE.ANDERSON@DomainName.Com

aaugustin

file://Network_Share/Marketing/EmployeePhotos/Audra01398.jpg

AUDRA.AUGUSTIN@DomainName.Com

abream

file://Network_Share/Marketing/EmployeePhotos/Allan00422.jpg

ALLAN.BREAM@DomainName.Com

aburgos

file://Network_Share/Marketing/EmployeePhotos/Alexandra00035.jpg

ALEXANDRA.BURGOS@DomainName.Com

 

They also had a couple of wrinkles in the mix…

The HRIS didn't store the user name with the domain suffix (domain\user). And more, they had two AD domain suffixes used for their employees. So, as users were imported from AD, their credentials might be domain1\user OR domain2\user. This is a wrinkle because the user profiles are referenced via that AD login name.

So, the PowerShell script needed to do the following:

  1. Find the domain user name
  2. Reference the proper network path to their employee photo
  3. Check which domain suffix was actually imported into SharePoint's user profile DB
  4. Assign the proper domain suffix to the user name to get the format of "Domain\Username"
  5. Import the employee photo to the user name
  6. Report any errors

Requirements to run this process are:

  • This must be performed using specific credentials which have elevated permissions within the farm. This means the credentials must be a member of the Farm Administrators group and must be listed as a Shell Admin in the SQL Server.
  • Need the following files placed in the same directory. In this example the directory is c:\scripts\
    • ImportUserPictures.ps1 – the PowerShell script which will perform the bulk picture import
    • UserPictureList.csv – a comma separated values file which contains import information. It should contain

 

This is the script for this process. It's not really complex.

 

Add-PSSnapin microsoft.sharepoint.powershell

 

[void][system.reflection.assembly]::loadwithpartialname("Microsoft.Office.Server.UserProfiles")

 

$csvFile = "c:\scripts\UserPictureList.csv"

 

$MySiteUrl = "http://mysites.domain.com/"

 

$site = Get-SPSite $MySiteUrl

 

$context = Get-SPServiceContext $site

 

$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

 

$csv = import-csv -path $csvFile

 

foreach ($line in $csv)

 

{

#Check which domain is being used for a particular user

try

{

$initialUserName = "domain1\" + $line.domain_user_name

$TestUserExists = ($profileManager.GetUserProfile($initialUserName))

$user_name = $initialUserName

}

catch

{

try

{

$initialUserName = "domain2\" + $line.domain_user_name

$TestUserExists = ($profileManager.GetUserProfile($initialUserName))

$user_name = $initialUserName

}

catch

{

$username = $line.domain_user_name

write-host -ForegroundColor Yellow $username "does not exist in the SharePoint user database"

$e1 = $username + "Does not exist in the SharePoint user database" | Out-file c:\scripts\useruploadlog.txt -Append

}

}

 

 

$up = $profileManager.GetUserProfile($user_name)

 

if($up)

 

{

 

$up["PictureURL"].Value = $line.path

 

$up.Commit()

 

write-host $user_name,"--->",$up.DisplayName,"--->",$line.path

 

$up = $null

 

}

 

}

#create thumbnails in Mysites

 

Update-SPProfilePhotoStore -MySiteHostLocation $mySiteUrl 2>> C:\scripts\useruploaderrors.txt

 

It may not be the solution to your issue, but maybe it will help you along.

Keep sharing!

 

1 - 10Next

 ‭(Hidden)‬ Admin Links

8/4/2016 5:45 PM   KCOG Meeting 
8/9/2016 7:00 PM   SharePoint - Kansas City Users Group 
9/1/2016 5:45 PM   KCOG Meeting 
9/13/2016 7:00 PM   SharePoint - Kansas City Users Group 
10/6/2016 5:45 PM   KCOG Meeting 
10/11/2016 7:00 PM   SharePoint - Kansas City Users Group 
11/3/2016 5:45 PM   KCOG Meeting 
11/8/2016 7:00 PM   SharePoint - Kansas City Users Group 
12/1/2016 5:45 PM   KCOG Meeting 
12/13/2016 7:00 PM   SharePoint - Kansas City Users Group 
(More Events...)

 ‭(Hidden)‬ Send Feedback