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

Thursday, March 12, 2015

Crawled Properties and Managed Properties in SharePoint

These two terminologies “Crawled Properties” and “Managed Properties” are very important to understand to have better knowledge on SharePoint search. These two concept are core to the SharePoint search.

Crawled Properties

By default when you create a SharePoint column on list or library, it will generate a crawled property which is marked with “Include in Full-Text Index”. The naming of crawled property will be ows_internalColumnName. You do not have any control over the creation of “Crawled Properties”.

The crawled property by itself is useless for you when trying to run or build search queries or even display the value of this property in search results. Crawled properties can be found in two ways – during crawling of the content and during content processing.

Crawled Property found during Crawling Time

When you crawl content from a SharePoint libraries, each column in the library is metadata associated to the corresponding document. Therefore they are exposed as crawled properties. In the below image, each column will be exposed as crawled property including custom column “Department”.







Crawled Property found during Content Processing

The second way the crawled property can be found is during content processing. The best example for this is that the metadata property defined for office documents as given below.
























Each one of the above properties are extracted during content processing time and exposed as crawled properties.

Managed Properties

Managed properties are basically group of one or more crawled properties. When site columns are crawled, SharePoint 2013 automatically creates crawled properties and also creates managed properties and adds a mapping between them. Regular columns do not. Let’s say, user has created a columns like “Customer Name” and “Client”. For the organization these two columns represent the same content / information but not for search. For search, they are just crawled properties and they are different as they do not share the same name. On top of this, since they are just crawled properties, if someone searches for all documents where Client = XYZ. Then they will find nothing at all. Because no search related feature works with crawled properties themselves. To make it work, you need to create a Managed Property and associate the respective crawled properties. Managed Properties appear in search result and user can execute query on this. Crawled properties can’t be used for this.

Mapping between Crawled and Managed Properties

We all know that SharePoint can crawl data from various system/sources. The data present in this various source system have metadata which can have different name but all refers to same information. For example, Author information is stored in different system can be Author, Writer, Created By, Owner etc. But all these fields represent same information that who has created the information/files/documents.

When SharePoint crawls these various systems, these fields are exposed as crawled properties. We can single managed property as “Author” in SharePoint and associate all the crawled properties as given below.



If you look at the managed property, they have a corresponding property called “Searchable”. This means if crawled property is mapped to managed property marked as searchable, those columns are searchable. However, if the managed property is NOT marked as searchable, even though crawled property is marked with “Include in Full-Text index”, it will NOT be searchable. Please refer the below table for clarification.

Crawled Properties
Managed Properties

Included in Full Text-Index
Not Included in Full Text-Index
Searchable
Not Searchable
Column Searchable






X






X


X


If a crawled property is mapped to two managed properties, where one of them are set as searchable, then the value will be searchable.

Happy reading and provide your feedback.



Tuesday, April 10, 2012

How to Implement Cascaded Dropdown List in SharePoint List

Introduction


This article explains step by step procedure to implement cascaded dropdown list in SharePoint list.

Background


I was recently working on large list with many fields were in these fields are dependent on other list fields as well as fields has to be populated based on the selection of previous field value. SharePoint doesn’t support cascaded dropdown list field as out of the box. But this can be implemented in 3 ways. They are given below.

1.      JavaScript
2.      JQuery
3.      InfoPath Forms

In this article, I will explain how to implement cascaded dropdown list in SharePoint list using JQuery. I will be creating 3 custom lists in SharePoint 2010 site. Below steps explains how to implement cascaded dropdown list in SharePoint list.

1.      Create Countries Custom List – Parent List
2.      Create Cities Custom List – Child List
3.      Create Vacation Plans Custom List – Cascaded functionality implemented
4.      JQuery Information
5.      Add JQuery Script to NewForm.aspx and EditForm.aspx file using SharePoint Designer


Create Countries Custom List

This section explains creation of Countries custom list. This list acts as parent list and will store list of countries. Follow the below steps to create Countries custom list.

   v  Go to SharePoint 2010 site.
   
   v  Click on ‘List’ link in the Left Navigation bar. Click on ‘Create’ link. See the below image for more information.

       

   v  This will open list creation pop-up window. In the list creation pop-up window, select ‘List’ option in the Left Side and select Custom List as template.
   
   v  Enter list name as ‘Countries’ and select ‘Create’ button. See the below image for more information.



   v  After creating Countries custom list, add items to list. See the below image for more information.







Create Cities Custom List

This section explains creation of Cities custom list. This list acts as child list and will store list of cities. Follow the below steps to create Cities custom list.

  v  Go to SharePoint 2010 site.

  v  Create custom list as Cities. Follow the steps explained in Countries list creation section.

  v  Create 'Country' column with below information.

o    Column Name : Country
o    Type : Lookup
o    Require that this column contains information : Yes
o    Enforce Unique value : No
o    Get Information from : Select ‘Countries’ from dropdown list
o    In this column : Select ‘Title’ from dropdown list
o    Click OK to create Country column.

  v  Add items to Cities custom list. See the below image for more information.


Create Vacation Plans Custom List

This section explains creation of ‘Vacation Plans’ custom list. This list implements cascaded dropdown lists functionality i.e. based on selection of ‘Country’, cities will be populated to dropdown list. Follow the below steps to create ‘Vacation Plans’ custom list.

  v  Go to SharePoint 2010 site.
  
  v  Create custom list as ‘Vacation Plans’. Follow the steps explained in Countries list creation section.
  
  v  Create Country column with below information.

o    Column Name : Country
o    Type : Lookup
o    Require that this column contains information : Yes
o    Enforce Unique value : No
o    Get Information from : Select ‘Countries’ from dropdown list
o    In this column : Select ‘Title’ from dropdown list
o    Click OK to create Country column.

  v  Create City column with below information.

o    Column Name : City
o    Type : Lookup
o    Require that this column contains information : Yes
o    Enforce Unique value : No
o    Get Information from : Select ‘Cities’ from dropdown list
o    In this column : Select ‘Title’ from dropdown list
o    Click OK to create City column.




JQuery Information

To implement cascaded dropdown list, we need to download below jquery files from Jquery site.

  v  Jquery.SPServices-0.6.2.min.js
  v  Jquery-1.6.2.min.js

Upload these two files to any document library where everyone has access to it. I would suggest to upload these files to document library of top level site. See the below image for more information.


Add JQuery Script to NewForm.aspx and EditForm.aspx using SharePoint Designer 2010

Follow the below steps to add jquery scripts to NewForm.aspx and EditForm.aspx file using SharePoint Designer 2010.

  v  Open ‘Vacation Plans’ list in SharePoint Designer 2010.

  v  Open NewForm.aspx and EditForm.aspx in advanced mode. See the below image for more information.



  v  Add the below script in both NewForm.aspx and EditForm.aspx page.

Insert the script below <asp:Content ContentPlaceHolderId=”PlaceHolderMain” runat=”server”> this tag.

See the below image for the script.



  v  Save the files and check-in.



Verification



1.      Go to ‘Vacation Plans’ list and click on ‘Add a new Item’ option.

2.      Select ‘India’ as Country. You could be able to see all Cities under India are populated to City dropdown list.





Comments


Provide your valuable feedback if this article is useful to you. Also don't forgot to post your queries/issues if any.