SharePoint

Add a Field Label for “Sort By” in a SharePoint 2013 Search Center

by jess on February 16, 2015

No Comments

Recently, I had a request to add a text label to the Sort By field in a SharePoint 2013 Search Center, so that end users would more quickly figure out what the field floating in the middle of the results page was for. This is a quick tip for those looking to do the same thing.

Enable Sorting in Search Results

To enable the Sort By feature in a search results page, perform the following steps:

  1. Edit the Search Results page
  2. Modify the Search Results Web part
  3. Under the “Settings” heading, click Show sort dropdown

When viewing the search results page, you should now see a field floating under the Search Navigation, but above the actual search results. In this case, the request was to add a text label next to the field to make it more clear what its purpose was:

Add a Label to the Sort By Field

jQuery?…

Initially, I thought it would be simple to use jQuery, which was already in the environment, to just find the structure in the DOM and insert a field label. In looking at the generated DOM in the page, I could see the following structure:

However, I found after several attempts to get a handle on #Sortby or #SortbySel using jQuery, that there was a timing issue between jQuery attempting to get ahold of the DOM structure, and SharePoint actually generating the elements. Using several event methods with jQuery, I kept coming up with null references. This should be simple, so time for a new approach… which reminded me of a comic I had seen on Hugh Wood’s blog:

Modern CSS

In this particular case, the end users of the Search Center were all using IE 11 and/or Google Chrome, so we had modern web browser capabilities at our disposable. Since I had the DOM structure, and knew what the HTML markup was for the field and its containers, I decided to use the CSS ::before selector to dynamically generate the field label.

I added an Alternate CSS file to the Search Center site settings, and used the following CSS to generate the label:

#ResultHeader #Actions #Sortby::before {

content: “Sort By: “;

font-weight: bold;
}

Once the CSS was added, we now had a label on the Sort By field, without timing issues!

Passing HTML in Nintex Workflow Start Workflow Web Service

by jess on October 15, 2014

No Comments

Nintex Workflow provides the capabilities to start other workflows using the “Call Web Service” workflow action. One of the benefits of this method, is that you can pass workflow variable values through the web service through the associationData parameter. The Nintex Community site has a good basic write-up on how do to this:

Start a Workflow using a Web Service

One of the tips missing from the article is how to pass HTML data using the web service method. If you follow the article to the letter, you will find that your data is not represented on the child workflow.

To pass HTML data, you need to use the “XmlEncode” Inline Function when creating your association data string. This will make the value of your data safe for transport:

encodertfunction

When the child workflow starts and receives the passing data, I have found it will automatically decode the value, and make it available for normal HTML display.

Parsing Values with Commas
If the value of your variable has commas contained within it, you might find that the function truncates the text value when the workflow runs. This is apparently due to the way the inline function is passed information from Nintex Workflow, separating values with commas. To protect against this, wrap your variable reference with {TextStart} and {TextEnd}:

encodertfunction2

This will pass the full value of your XML encoded content so you can complete the process!

Fixes in SharePoint 2010 Service Pack 2

by jess on July 31, 2013

No Comments

Microsoft recently released Service Pack 2 for SharePoint, which can be downloaded on “Updates for SharePoint 2010 Products” page. Below are the fixes specifically included in the updates:

Fixes in the SP2 Update

http://support.microsoft.com/kb/2687453

  • Navigating to a SharePoint site with a BlackBerry device may open a non-mobile page.   Adding RIM6 into compat.browser allows users to access SharePoint pages and view documents in mobile view.
  • If anonymous access is enabled for SharePoint 2010 SP1 (or later Cumulative Update), attempts to to access the site via a mobile device will receive an authentication prompt.
  • Customers are unable to use spell check in Korean when running SharePoint on Windows Server 2012.
  • Displaying Summary Links Web Part in personalizing view; generating confusing error message.
  • Deployment fails for content types containing a formula field in Italian.
  • File attachments are not deleted due to incorrect URL formatting.
  • If requireExactUrl is not set for openweb calls, the PublishingWeb constructor may spawn variation pages  into incorrect locations while attempting re-creation of failed label during create hierarchies.
  • Incremental content deployment fails, giving the following error: FatalError: The given key was not present in the dictionary.
  • Spell Checker doesn’t work properly with Internet Explorer 10.
  • Rich text editor spell checker may work incorrectly on 64 bit machines.
  • Customers encounter issues sending e-mail from workflows when the From address uses a non-Unicode character set.
  • Updated VBE7.dll to fix safe array corruption for x64 hosts when calling UDF methods using safe array arguments directly from the host.
  • SQL exceptions will appear in the log when running update statistics timer.
  • Improved performance of the AllUserData table.
  • Getting a feed against a discussion board fails if feed contains more than zero items.
  • SharePoint 2010 client object model now has compatibility for accessing SharePoint 2013 servers.
  • Windows 8 users with Internet Explorer 10 receive an error when trying to open a document from SharePoint 2010 directly in the Office client.
  • Call GetChanges won’t return changes in certain cases where the change log has been edited and no parameters are set.
  • STSAdm MigrateUser fails when SQL server is not in domain.
  • Attempting to delete a child web from site settings causes the page to fail.
  • There is no exposed method to recalculate the second stage recycle bin size.
  • April 2011 Calendar View does not display correctly with Amman System Time zone.
  • Users can create a scenario where a site loses permissions.
  • After deleting a web that contains historical document versions in the RecycleBin, rows are abandoned in the database.  These rows bloat the size of the database, causing difficulty with database management operations such as backup/restore, complicating upgrade and other scenarios.
  • After creating alerts on a document library with unique permissions and moving the contents using SPFolder.MoveTo method, the permissions seem to be lost and even the farm administrator is not able to delete these alerts.

Hide Distribution List Membership in SharePoint 2010 User Profiles

by jess on July 9, 2013

No Comments

To hide Exchange distribution list memberships on SharePoint 2010 user profiles, follow these steps:

  • Access Central Administration
  • Access the User Profile Service Application
  • Under People, click Manage Policies

2013-07-09_1432

  • Under Memberships, click Distribution List, then click Edit Policy

2013-07-09_1434

  • Change the Policy Settings field to: Disabled
  • Uncheck the checkbox for User can override

2013-07-09_1444

  • Click OK

The distribution lists should now no longer display on individual User Profiles in SharePoint.

Install SharePoint Server 2010 SP1 with Office Web Apps

by jess on July 10, 2011

No Comments

This post is a screenshot walk through of upgrading a standalone (with SQL Server) SharePoint Server 2010 installation to Service Pack 1, along with Office Web Apps.

I’m not sure that the first run on the Config Wizard needs to take place, but since there are some prerequisites to OWA SP1 if you don’t have SharePoint SP1 installed first, I’m doing them separate.

Download:

Order of Installation:

  1. Install the binary files for Foundation SP1
  2. Install the binary files for SP Server SP1
  3. Run the SharePoint Configuration Wizard
  4. Install Office Web Apps SP1
  5. Run the SharePoint Configuration Wizard

Update I: Here is an excellent write up on the steps and procedures for installing on a full farm.

Continue Reading

7919155538_8ef0b3c95e_kb

Missing Site Column on a Custom Content Type

by jess on May 8, 2011

1 Comment

Recently, I ran into an odd issue in a SharePoint environment where a Site Column disappeared on a custom Content Type. I could still see it in the View, and it was holding a value, but I couldn’t see it on the Content Type page or anywhere else. A colleague pushed me into PowerShell, and I was able to do a quick analysis of the Site Column and see that somehow it had been set to Read Only. Once I set the value of Read Only to false, the field appeared like normal.

   1:  $site = new-object Microsoft.SharePoint.SPSite("http://site")
   2:  $web = $site.RootWeb
   3:  $missingField = $web.Fields["FieldName"]
   4:  $missingField.ReadOnlyField = $false
   5:  $missingField.Update()

SPS2010 – October CU Issues

by jess on November 7, 2010

No Comments

The SharePoint Team blog posted a notice Friday (11/5), that there was an issue with the SPS2010 October CU, and to not install it. Cryptically, they said if you have installed it, to contact Microsoft Support.

Later in the day, they posted a follow-up, detailing which packages were affected (SharePoint Server Package 2394320 and Project Server Package 2394322), and steps for a workaround.

It appears that the main issue is that the User Profile Service Application loses the assigned permissions during the install of the CU. The post walks you through resetting the permissions.

SharePoint/Office 2010 RTM Downloads

by jess on April 22, 2010

No Comments

The following are available on TechNet and MSDN:

  • Project Professional 2010 (x64) – (English) 272 (MB)
  • Project Professional 2010 (x86) – (English) 235 (MB)
  • Project Standard 2010 (x64) – (English) 245 (MB)
  • Project Standard 2010 (x86) – (English) 223 (MB)
  • Office Professional Plus 2010 (x64) – (English) 718 (MB)
  • Office Professional Plus 2010 (x86) – (English) 650 (MB)
  • SharePoint Server 2010 (x64) – DVD (English) 723 (MB)
  • Visio 2010 (x64) – (English) 343 (MB)
  • Visio 2010 (x86) – (English) 293 (MB)

Discover core databases for a Windows SharePoint Services 3.0 farm

by jess on March 4, 2010

No Comments

Below are steps for one method to discover databases used by a WSS 3.0 farm. Log in to SharePoint Central Administration for each of these activities.

Configuration Database

  1. Go to the “Operations” tab
  2. Click “Servers in Farm”
  3. Under “Farm Information” see the following items:
    1. Configuration database server
    2. Configuration database name

Central Administration Content Database

  1. Go to the “Application Management” tab
  2. Click “Web application list”
  3. Click “SharePoint Central Administration v3″
  4. Under “SharePoint Site Management”, click “Site collection list”
  5. Under the root “/” site, look in the information table for the “Database Name” value

General Usage Content Databases

  1. Go to the “Application Management” tab
  2. Click “Web application list”
  3. For each web application listed other than “SharePoint Central Administration v3″ (see above), perform the following:
    1. Click the web application name
    2. Under “SharePoint Site Management”, click “Site collection list”
    3. For each listed site collection (by URL):
      1. Click the URL of the site collection
      2. In the information table, look for the “Database Name” value

Search Database

  1. Go to the “Operations” tab
  2. Under “Topology and Services”, click “Services on server”
  3. Click the text “Windows SharePoint Services Help Search”
  4. Under “Search Database”, look for the values:
    • Database Server
    • Database Name

Nintex Workflow – “Run If” is King

by jess on November 17, 2009

No Comments

If you run into logic nesting issues using Nintex Workflow, remember that “Run If” is better than “Set a Condition”.