cookieChoices = {};

Saturday, 18 July 2015

List and Libraries

Introduction to Lists

·         A list is a repository where data is systematically stored and displayed in SharePoint.
·         You can use the lists that come with your site as is, you can change or delete lists that you don't use, and you can create your own lists.
·         SharePoint has templates for links, announcements, contacts, events, tasks, and issues lists.
·         When we create our own lists, we can base them on the designs used for the built-in lists, or we can create custom lists from scratch.

There are four categories of Lists
  1. Libraries: Contains the list type useful for managing the documents.
  2. Communication: Contains the list types useful for communicating with other people
  3. Tracking: Useful for managing tasks and plans
  4. Custom Lists: Useful for creation of our own list

 

To Create Custom List

Open Siteà All Site Content àCreate àList à Custom List à Name: Student à CREATE

After this is done in the site, in Quick Launch we can notice a new link to this list is added.
Once a list is created columns can be added to a list.  There are two types of columns that can created and added to the list
1)       List columns : Can be used only in the current list
2)       Site columns : Can be used in any list in any site in web application
Adding Columns to a List
Open Student ListàIn Ribbon Select List (List tools) àCreate Column
Example:
  1. Courses {Course Name(Text), Duration(Number), Overview(Multiline Text), Fees(Currency)}
  2. Faculties {Faculty Name(Test), Photo(Hyperlink or Picture), Experience(Number), Join Date(Date), Courses(Lookup), Designation(Calculated based on Experience), Manager(Person or Group)}
  3. Batches {Batch Name, Location(Choice), Course(Lookup), Faculty(Lookup), Starting Date and Time}

For Calculated Columns Sample Formula:
Column Name=Experience
=IF(Experience<1,"Trainee",IF(AND(Experience>=1,Experience<3),"Junior","Senior"))
Operators: AND, OR, NOT, =, <, >
Most of the times, the formula can be created in excel and used here.


Referential Integrity and Projected Fields in Lists
This is valid only for Lookup Fields in the list.

List in SharePoint 2010 supports Referential Integrity with another list. So if you have two lists Courses and Batches, you can create a referential integrity constraint (Cascade Delete or Restrict Delete) between them.

Index Column
SP2010 now allows list designers to create up to 20 indices (some of multiple columns) on any one list.  These indices allow for faster query of data when the list size exceeds that of typical.
To Set Index Column: Select List à List Settings à Columns à Indexed columns
The following is a list of column types usable as indexed columns:
·         Single line of text
·         Choice field, but not multi choice
·         Number
·         Currency
·         Date/Time
·         Look up, but not a multi value look up
·         Person or group, but not multi value
·         Title, except in a document library

To enter bulk data into the list
Open ListàRibbonà Datasheet View.  This opens the list in grid like view where bulk data can be entered.

To Export data to MS. Excel
Open Student ListàActionsàOpen in Spread Sheet.  This opens the list in MS Excel.

Sort and Filter the data:  
To Sort: To sort the list click on the heading of the column.
To add Filter:  click on the ∆ button beside the column name and select the desired filter criteria (rows)

Column Level and List Level Validations:
1.       Column Level validation must evaluate to TRUE for validation to pass. It can be used for validating current column and cannot be compared with other columns
Example: Join Date of faculty must be either today or previous date.
2.       List Level Validation can be used for validations involving multiple columns of the list.
a.        To validate: Ribbon à List Settings à Validation Settings
                Example: Experience of the faculty must be greater than Year(Today()) minus Year(Join Date)
Solution: =(INT(Experience)>=YEAR(TODAY())-YEAR([Join Date]))

Alert Me Option
Select List à List Tools, List (Ribbon) à Alert Me à Alert Title = Student à Send Alerts To = <usernames>, Delivery Method = E-mail, Change Type=All Changes, Anything Change àSend notification immediately à OK

Custom Views
Custom views are used to do one or more of the following:
  • Filter by a set of criteria
  • Sort in a particular order
  • Hide or show columns
  • Group information based on list data
  • Display subtotals of columns
  • Show lists with date information as calendars or tables

Creating Customs Views
Custom Views can be created, saved and viewed any time.  Custom views are done to filter columns.  Here one can select the desired columns for display.

Select Listà List Tools, List (Ribbon)à Create View à Standard View

Creating Site Columns & Group
Site Action à Site Settings à Galleries à Site Columns à Create à
New Group = Team
Team Name {Choice (Team1, Team2, Team3)}

Add 2 more columns: Coordinator Name, Team Size

Attaching Site Columns to List
Select List from Menu à List (Ribbon) à List Settings à Add from existing Site Columns à Select Site Column From = “Team”

 

Example: Team Name can be used in Batch List and Faculty List
Advantage: Changes made to the site column are automatically reflected in all the lists where the column has been used.
Content Type
·         Content Type is primarily a collection of references to site columns that defines a complex type.
·         SharePoint supports reuse of site columns across multiple content types. It also ensures that changes to a site column propagate across all content types.
·         Content Types are like Classes and Lists are like Objects. List is an instance of Content Type. Changes made to the content type after the list is created are automatically reflected in the list.

1.       To Create a Content Type

 Site ActionsàSite SettingsàSite Content TypesàCreate à Name: TeamCT àDescription: Content type of TeamsàParent Content Type= List Content TypeàParent: ItemàSelect NEW GROUP: Team àOK
2.       Adding Columns to Content Types
Add from Existing Site ColumnsàSelect Column: All GroupsàAvailable Columns: Team NameàOK
TeamCT (Team Name, Coordinator Name, Team Size)

3.       Create a List

Development Teams & Training Teams

4.       To allow managing of content types in a existing List

Open Development Teams List àList (Ribbon)àList SettingsàGeneral SettingsàAdvanced SettingsàAllow management of Content Type: YES àOK
5.       Go to Add from existing site content types
Add from existing site content typesàAddàTeamsàOK
6.       Go to Change new button order and default content type
Set TeamCT Position = 1 and Item Position = 2
Hide Item from New Button (Uncheck visible)

Important Note:
In List created using content type, if the column is changed, it doesn’t change the actual site column. But if the site column is changed, the changes made to the column in list are lost and are overwritten with the changes made to site column.

List Template

A list that has been created once can be saved as a template and this template can be used to create other list with the same schema.

Steps: Open ListàSettings à List SettingsàSave List as TemplateàFile Name: FacultyListTemplateàTemplate Name: Faculty TemplateàDescription: Template to create a faculties like list àInclude content: uncheck (if copying data is not required) à OK

 

Now to View the List template we just created

Top Level SiteàSite ActionsàSite SettingsàGalleriesàList Templates

To Create a List from a Template

Go to the target SiteàSite Actionsà CreateàCustom ListsàFaculty Template à Name: LabFaculty àDescription: List of Lab Faculties who will be supporting the teaching faculty.àSelect option YES àOK

Versioning of Data / Content Approval

Steps to allow Versioning of data

Open List àSettingsàList Settings à[under General settings] Versioning SettingsàCreate a version each time: YESàSelect Keep the Following Number of versions: 5
For enabling approval
Require content Approval: YESàNumber of drafts: 5 àwho should see items in this list àSelect Only Users Who Can Edit Items àOK
Example: New batches posted requires approval of administrator (owner or designer role)
Note: By using content approval the items will need to be approved by Administrator before it appears in the list (as approved).  The items that are not approved are ‘drafts’.  Draft items can be changed by users before approval.  When Administrator views the record he has an option to Approve, Reject of keep it as Pending
Metadata Navigation Settings
1.       Configure Navigation Hierarchies
2.       Configure Key Filters
Both the options are shown in the Left Navigation below the list of Quick Navigation Bar.
Both can be used for filtering the current view to show only the items matching the selected value.
Open List àSettingsàList Settings à General settings à Metadata navigation settings.

Pre-location view settings:
Some of the views can be hidden based on the Location selected in the navigation bar. This can be done only after having Metadata Navigation Hierarchy.

Throttling

As the items in the SharePoint list continue to grow, the performance of the queries retrieving data from the list decreases. To help SharePoint users, Microsoft has provided different Performance Control checks through “Resource Throttling” on lists in SharePoint 2010.

 “Through throttling settings, SharePoint Server 2010 provides a way for administrators to determine the level at which the server will go into throttling mode. Every five seconds, a job runs that checks server resources compared to configured levels. By default, Server CPU, Memory, Request in Queue, and Request Wait Time are monitored. After three unsuccessful checks, the server enters a throttling period and will remain in this state until a successful check is completed. Requests that were generated prior to the server’s entering throttling mode will be completed. This will, in theory, keep users from losing any current work when the server begins to throttle requests. Any new HTTP GET and Search Robot requests will generate a 503 error message and will be logged in the event viewer.”

Central Administration à Application Management àManage Web Application. Once in the Web Application List, select the web application and click General Settings àResource throttling
Property
Code Run in Context of Normal List User A (But Not SharePoint Administrator)
Code Run in Context of User B (SharePoint Administrator)
List Items Count < “List View Threshold “ (5000),
i.e. <5,000
Code will run fine and return the required result.
Code will run fine and return the required result.
List Item Count > “Warning Level” (2000)
i.e. >2000 but < 5000
No exception is thrown, code runs fine
No Exception is thrown, code runs fine.
List Items Count > “List View Threshold”(5000) But Less than “List View Threshold for Auditors and Administrators” (20,000),
i.e. >5,000 but < 20,000
An Expensive Query Exception is thrown
No Exception is thrown, and the code will return the required result.
List Items Count > “List View Threshold for Auditors and Administrators”(20,000),
i.e. >20,000
An Expensive Query Exception is thrown
A Expensive Query Exception is thrown
During Time of Daily Time Window for Large Queries.
Query threshold not applied, query runs fine even if the threshold limit is exceeded.
Query threshold not applied, query runs fine even if the threshold limit is exceeded.
Object Model Override = true and RequestThrottleOverride is overridden
Exception thrown if list is throttled, this property cannot be overridden by a normal user.
No exception thrown, even if the list is throttled (i.e. Items Count >20,000)


No comments:

Post a Comment