SlideShare a Scribd company logo
1 of 19
Create list relationships by using unique and lookup columns
Applies to: Microsoft SharePoint Foundation 2010 , SharePoint Server 2010


In SharePoint 2010, you can create relationships between lists by using a combination of unique columns,
lookup columns, and relationship enforcement (cascade and restrict delete), all of which enhance your
ability to create more sophisticated business solutions and help preserve the integrity of your data.




Overview of list relationships


The following sections provides important background information about creating relationships between
source and target lists, creating unique and lookup columns, enforcing list relationship behavior, adding
primary and secondary lookup columns, viewing, editing, and deleting items within list relationships,
managing list relationships when lists have many items, and the additional benefits of using SharePoint
editing programs, such as Microsoft Office SharePoint Designer 2010.

Using unique and lookup columns to process gift orders.




   Each list has unique columns to ensure that the correct data is matched

   The Items list is the source list and the Orders list is the target list..

   The primary lookup column in the source list "looks up" the Order ID column in the target list based
on a matching value.
A secondary lookup column in the source list automatically inserts the Orders Description column from
the target list.



CREATING UNIQUE COLUMNS
When you create a column, you can specify that the column must contain unique values. This means that
the list cannot have any duplicate values in that column. You cannot add a list item that contains a
duplicate value, modify an existing list item that would result in creating a duplicate value, or restore an
item from the Recycle Bin if it would result in a duplicate value. Furthermore, if you create a lookup
column in a source list, and you define that column to be unique, the column in the target list must not
contain duplicate values.

 NOTE      Uniqueness is not case-sensitive, so for example, ORD-231 and ord-231 are considered
duplicate values.
A unique column must also have an index. When you create a unique column, SharePoint 2010 prompts
you to create the index and automatically creates one when you click OK. Once a unique column has an
index, you cannot remove the index from that column, unless you first redefine the column to allow
duplicate values.

The following table summarizes what column types can and cannot be used to create unique columns.

SUPPORTED COLUMN TYPES            UNSUPPORTED COLUMN TYPES


Single line of text               Multiple lines of text


Choice (single value)             Choice (multi-valued)


Number                            Calculated


Currency                          Hyperlink or Picture


Date and Time                     Custom Columns


Lookup (single value)             Lookup (multi-valued)


Person or Group (single value)    Person or Group (multi-valued)


                                  Yes/No



CREATING LOOKUP COLUMNS
To create a relationship between two lists, in the source list, you create a lookup column that retrieves (or
"looks up") one or more values from a target list if those values match the value in the lookup column in




©2009 Microsoft Corporation.
the source list. Once you create this lookup column (the primary column), you can continue to add
additional columns (secondary columns) from the target list to the source list, as long as those additional
columns have a supported data type described below.

The following table summarizes what column types can and cannot be used to create lookup columns.

SUPPORTED COLUMN TYPES               UNSUPPORTED COLUMN TYPES


Single line of text                  Currency


Multiple lines of text               Lookup


Choice                               Person or Group


Number                               Calculated


Date and Time                        Hyperlink or Picture


Yes/No                               Custom Columns


There are two types of lookup columns that you can create, a lookup column with an enforced
relationship and a lookup column with an unenforced relationship.


A lookup column with an enforced relationship
In a lookup column with an enforced relationship (also called referential integrity), you can lookup single
values and maintain the integrity of your data in the target list in one of two ways:

Cascade Delete        When an item in the target list is deleted, the related item or items in the source list are
also deleted. In this case, you want to make sure that all related items are deleted as part of one database
transaction. For example, if you delete an order in a target list, you can ensure that the corresponding
order items in the source list is also deleted. You don't want to have order items without a corresponding
order, because that would create "orphan" order items that might cause confusion later on.

Restrict Delete       When you try to delete an item in the target list, and it has one or more related items in
the source list, you are prevented from deleting the item in the target list. In this case, you want to ensure
that the related item in the target list is preserved. For example, someone tries to delete an order item
from a target list, a customer may still have that order pending, and you want to prevent that delete
operation from occurring until the order has been processed. You don't want the customer’s order to be
accidentally deleted because that would affect your ability to complete the order.




©2009 Microsoft Corporation.
A cascade delete operation ensures all related items are deleted in one database transaction.

   A restrict delete operation prevents deleting items in the target list if related source list items exist.

In short, enforcing a list relationship behavior helps keep your data valid and helps prevent
inconsistencies that might cause problems down the road.

 NOTE     You must have Manage Lists permission on a list to create or modify an enforced relationship.
A lookup column that enforces a relationship must also have an index. When you create a lookup column
that enforces a relationship, SharePoint 2010 prompts you to create the index, and automatically creates
one when you click OK. Once a lookup column that enforces a relationship has an index, you cannot
remove the index from that column, unless you first remove the enforced relationship.


A lookup column with an unenforced relationship
In a lookup column with an unenforced relationship, from the source list, you can lookup single or
multiple values in the target list. Also, when you delete an item in the source list, as long as you have
delete permission on the list, there are no additional delete restrictions or delete operations that occur in
the target list.




©2009 Microsoft Corporation.
Overview of list relationships


The following sections provides important background information about creating relationships between
source and target lists, creating unique and lookup columns, enforcing list relationship behavior, adding
primary and secondary lookup columns, viewing, editing, and deleting items within list relationships,
managing list relationships when lists have many items, and the additional benefits of using SharePoint
editing programs, such as Microsoft Office SharePoint Designer 2010.

Using unique and lookup columns to process gift orders.




   Each list has unique columns to ensure that the correct data is matched

   The Items list is the source list and the Orders list is the target list..

   The primary lookup column in the source list "looks up" the Order ID column in the target list based
on a matching value.

   A secondary lookup column in the source list automatically inserts the Orders Description column from
the target list.



CREATING UNIQUE COLUMNS
When you create a column, you can specify that the column must contain unique values. This means that
the list cannot have any duplicate values in that column. You cannot add a list item that contains a
duplicate value, modify an existing list item that would result in creating a duplicate value, or restore an




©2009 Microsoft Corporation.
item from the Recycle Bin if it would result in a duplicate value. Furthermore, if you create a lookup
column in a source list, and you define that column to be unique, the column in the target list must not
contain duplicate values.

 NOTE      Uniqueness is not case-sensitive, so for example, ORD-231 and ord-231 are considered
duplicate values.
A unique column must also have an index. When you create a unique column, SharePoint 2010 prompts
you to create the index and automatically creates one when you click OK. Once a unique column has an
index, you cannot remove the index from that column, unless you first redefine the column to allow
duplicate values.

The following table summarizes what column types can and cannot be used to create unique columns.

SUPPORTED COLUMN TYPES            UNSUPPORTED COLUMN TYPES


Single line of text               Multiple lines of text


Choice (single value)             Choice (multi-valued)


Number                            Calculated


Currency                          Hyperlink or Picture


Date and Time                     Custom Columns


Lookup (single value)             Lookup (multi-valued)


Person or Group (single value)    Person or Group (multi-valued)


                                  Yes/No



CREATING LOOKUP COLUMNS
To create a relationship between two lists, in the source list, you create a lookup column that retrieves (or
"looks up") one or more values from a target list if those values match the value in the lookup column in
the source list. Once you create this lookup column (the primary column), you can continue to add
additional columns (secondary columns) from the target list to the source list, as long as those additional
columns have a supported data type described below.

The following table summarizes what column types can and cannot be used to create lookup columns.

SUPPORTED COLUMN TYPES            UNSUPPORTED COLUMN TYPES




©2009 Microsoft Corporation.
Single line of text                  Currency


Multiple lines of text               Lookup


Choice                               Person or Group


Number                               Calculated


Date and Time                        Hyperlink or Picture


Yes/No                               Custom Columns


There are two types of lookup columns that you can create, a lookup column with an enforced
relationship and a lookup column with an unenforced relationship.


A lookup column with an enforced relationship
In a lookup column with an enforced relationship (also called referential integrity), you can lookup single
values and maintain the integrity of your data in the target list in one of two ways:

Cascade Delete        When an item in the target list is deleted, the related item or items in the source list are
also deleted. In this case, you want to make sure that all related items are deleted as part of one database
transaction. For example, if you delete an order in a target list, you can ensure that the corresponding
order items in the source list is also deleted. You don't want to have order items without a corresponding
order, because that would create "orphan" order items that might cause confusion later on.

Restrict Delete       When you try to delete an item in the target list, and it has one or more related items in
the source list, you are prevented from deleting the item in the target list. In this case, you want to ensure
that the related item in the target list is preserved. For example, someone tries to delete an order item
from a target list, a customer may still have that order pending, and you want to prevent that delete
operation from occurring until the order has been processed. You don't want the customer’s order to be
accidentally deleted because that would affect your ability to complete the order.




©2009 Microsoft Corporation.
A cascade delete operation ensures all related items are deleted in one database transaction.

   A restrict delete operation prevents deleting items in the target list if related source list items exist.

In short, enforcing a list relationship behavior helps keep your data valid and helps prevent
inconsistencies that might cause problems down the road.

 NOTE     You must have Manage Lists permission on a list to create or modify an enforced relationship.
A lookup column that enforces a relationship must also have an index. When you create a lookup column
that enforces a relationship, SharePoint 2010 prompts you to create the index, and automatically creates
one when you click OK. Once a lookup column that enforces a relationship has an index, you cannot
remove the index from that column, unless you first remove the enforced relationship.


A lookup column with an unenforced relationship
In a lookup column with an unenforced relationship, from the source list, you can lookup single or
multiple values in the target list. Also, when you delete an item in the source list, as long as you have
delete permission on the list, there are no additional delete restrictions or delete operations that occur in
the target list.




©2009 Microsoft Corporation.
VIEWING AND EDITING ITEMS IN LIST RELATIONSHIPS
One of the beneficial effects of creating list relationships is that you can display and edit columns from
two or more lists, on one page. When you create a lookup column in a source list, the primary column
displays values from the target list column, but you can also specify that additional, secondary columns
from the target list also display alongside the primary column and the other source list columns.

The primary column value is a link which you can click to the display all the column values of that item in
the target list. Each secondary column value from the target list displays as text in the source list column.
If you create a lookup column with multiple values, each column from the target list, whether primary or
secondary, display their multiple corresponding values delimited by semicolons. You can manipulate these
primary and secondary columns in list view in much the same way as the columns from the source list, by,
for example, adding, removing, filtering and sorting them.

The primary column name is a name you provide when you create the lookup column. By default, each
secondary column name follows a standard naming convention of <primary column name in source list>:
<column name in target list>. Changing the name of the primary column, therefore, changes the names
of all secondary columns. However, you can modify the default secondary column names and descriptions
to make the names more meaningful to you.




   A primary lookup column with multiple values.

   A secondary lookup column with multiple values.




©2009 Microsoft Corporation.
The column name has been changed from the default name of GetID: Title toInstruments.

  TOP OF PAGE
DELETING ITEMS AND LISTS IN A LIST RELATIONSHIP
If you want to delete items or lists in a list relationship, then you need to be aware of the consequences of
doing this operation on the source and target lists and any related columns, especially if the lists have an
enforced relationship of restrict delete or cascade delete. To maintain the integrity of the data, SharePoint
2010 may block you from deleting items even when you have delete permission. Deleting these items also
requires the backend database to temporarily lock the data when performing the delete transaction,
which can time to complete.

The following sections describe what happens in more detail.

Delete a source or target list item with an unenforced relationship When you try to delete a source
or target list item that does not have an enforced relationship, then the following occurs:

You can remove the item from the source or target list.
The related item in the target or source list is not deleted.

Delete a source list item with an enforced relationship of restrict delete When you try to delete an
item in the source list with an enforced relationship of restrict delete, then the following occurs:

You can remove the item from the source list.
The related item in the target list is not deleted

Delete a target list item with an enforced relationship of restrict delete When you try to delete an
item in the target list with an enforced relationship of restrict delete, then the following occurs:

You receive an error message that the column is used to enforce the restrict delete operation.
You cannot delete the target list item, even if you have delete permission on this item.

Delete a source list item with an enforced relationship of cascade delete When you try to delete an
item in the source list with an enforced relationship of cascade delete, then the following occurs:

You can then delete the item in the source list.
The related item in the target list is not deleted.

Delete a target list item with an enforced relationship of cascade delete When you try to delete an
item in the target list with an enforced relationship of cascade delete, then the following occurs:

You can delete the item in the target list and all related items in the source list.
The delete operation occurs as a database transaction, which means that the entire delete operation must
complete to ensure that neither list is left in an invalid state.




©2009 Microsoft Corporation.
NOTE     In the case of a Document Library, if the item in the source list is a checked out file, both items
are still deleted.
Delete a source or target list with an unenforced relationship           When you try to delete a source and
target list with an unenforced relationship, then you can delete either the source list or the target list, just
like any other list.

Delete a source or target list with an enforced relationship of cascade or restrict delete           When you
try to delete a source or target list with an enforced relationship of cascade or restrict delete, the
following occurs:

You receive a warning that the source or target list has one or more relationships with other lists, and
those lists are displayed in the warning message.
You cannot delete the source or target list.

Restoring from the Recycle Bin        If the Recycle Bin is enabled on your site, then all deleted items are
stored in the recycle bin, and you can restore them if you need to. If the items were deleted in one
database transaction as part of a cascade delete operation, all items in the relationship are displayed, and
you can restore them as well. However, the original target and source lists must still exist, or else the items
cannot be restored.

To summarize:

When an item in the target list is deleted, a cascade delete operation also deletes all related items in the
source list.
When you try to delete an item in the target list, a restrict delete operation will prevent you from deleting
the item in the target list if it has one or more related items in the source list.
You cannot delete lists participating in an enforced relationship.



MANAGING LIST RELATIONSHIPS WHEN LISTS HAVE MANY ITEMS
When you create list relationships by using lookup columns, unique columns, and lists with enforced
relationships, you can reach a resource threshold or limit and may be blocked under the following
circumstances:

If you make a column unique in an existing list that has more items than the List View Threshold (but note
that adding one item to a list that makes the list greater than the List View Threshold is an operation that
is not usually blocked).
If you turn on Cascade Delete or Restrict Delete for a lookup field in a list that has more items than the
List View Threshold.
You have exceeded the List View Lookup Threshold, which by default is eight lookup columns.
The number of items in a delete operation exceeds 1,000.




©2009 Microsoft Corporation.
USING EDITING PROGRAMS, SUCH AS OFFICE SHAREPOINT DESIGNER 2010
     Consider using an editing program compatible with SharePoint 2010. For example, Microsoft Office
     SharePoint Designer 2010 helps you work with list relationships by providing additional functionality and
     features. You can connect a List View Web Part or Data Form Web Part to a Related List Web Part to
     vertically display multiple values from the Lookup target list. You can also restrict insert operations as part
     of a field validation by using the List Schema editor.

     Find more information about Office SharePoint Designer 2010 in that product's Help system.


     How to create a unique and lookup column

     The following sections provide step-by-step instructions for creating a unique column and a lookup
     column.

     CREATE OR MODIFY A UNIQUE COLUMN
      WARNING       You cannot create a unique column in a list with item-level permissions defined, you cannot
     break inheritance of permissions from a list to a list item if the list contains a unique column, you cannot
     create a unique column or modify a column to be unique in a list that contains items with unique
     permissions or one that has content approval enabled, and you cannot copy a file to a library by using
     the Open with Explorer command, if that library contains a unique column.
1.   Navigate to the site containing the list for which you want to add a unique column.

2.   Click the name of the list on the Quick Launch, or click Site Actions, click View All Site Content, and
     then under the list section, click the name of the list.

3.   In the ribbon, click the List tab, and then in the Manage Views group, click Create Column.

4.   In the Columns Name box, type a name for the column.

5.   Under The type of information in this column is, click one of the following:


     Single line of text
     Multiple lines of text
     Choice Number
     Currency
     Date and Time
     Yes/No
     Lookup (single value)
     Person or Group (single value)


6.   In the Additional Column Settings section, under Enforce unique values click Yes.


     If you select a data type that is not supported, or of you are creating a lookup column that allows multiple
     values, the Enforce unique values is not displayed.




     ©2009 Microsoft Corporation.
NOTE     A SharePoint site can be significantly modified in appearance and navigation. If you cannot
     locate an option, such as a command, button, or link, contact your administrator.

     You cannot remove the index of a unique column. If you want to remove the index, you must change the
     column from a unique column to one that allows duplicate values first, and then remove the index.
     If you try to change an existing column from duplicate values to unique values, you may be prevented
     from doing this operation if the existing column contains duplicate values. In this case, you must remove
     all the duplicate values first, and then change the column from allowing duplicate values to a unique
     column.
     If you want to change the data type of the unique column, you must do the following: change the column
     to allow duplicate values, remove the index, change the column to the other supported data type, and
     then make the column unique.



     CREATE A LOOKUP COLUMN
1.   Navigate to the site containing the list for which you want to add a lookup column.

2.   Click the name of the list on the Quick Launch, or click Site Actions, click View All Site Content, and then
     under the list section, click the name of the list.


      NOTE     A SharePoint site can be significantly modified in appearance and navigation. If you cannot
     locate an option, such as a command, button, or link, contact your administrator.
3.   In the ribbon, click the List tab, and then in the Manage Views group, click Create Column.

4.   In the Columns Name box, type a name for the column.

5.   Under The type of information in this column is, click Lookup.

6.   In the Get information from box, select a target list.

7.   In the In this column box, select a primary column.

8.   Under Add a column to show each of these additional fields, for each secondary column you want to
     add, click the check box next to the column name. Only columns with supported data types are listed.

9.   Later on if you want to add or remove secondary columns, modify the lookup column and make the
     selections you want.

             NOTE     You cannot index a secondary column nor can you make a secondary column unique.
10. If you want the lookup columns to display in the default view, select Add to default view.

11. To create an enforced relationship, select Enforce relationship behavior and then click Restrict
    Delete or Cascade Delete.




     ©2009 Microsoft Corporation.
12. Click OK.


    VIEWING AND EDITING ITEMS IN LIST RELATIONSHIPS
    One of the beneficial effects of creating list relationships is that you can display and edit columns from
    two or more lists, on one page. When you create a lookup column in a source list, the primary column
    displays values from the target list column, but you can also specify that additional, secondary columns
    from the target list also display alongside the primary column and the other source list columns.

    The primary column value is a link which you can click to the display all the column values of that item in
    the target list. Each secondary column value from the target list displays as text in the source list column.
    If you create a lookup column with multiple values, each column from the target list, whether primary or
    secondary, display their multiple corresponding values delimited by semicolons. You can manipulate these
    primary and secondary columns in list view in much the same way as the columns from the source list, by,
    for example, adding, removing, filtering and sorting them.

    The primary column name is a name you provide when you create the lookup column. By default, each
    secondary column name follows a standard naming convention of <primary column name in source list>:
    <column name in target list>. Changing the name of the primary column, therefore, changes the names
    of all secondary columns. However, you can modify the default secondary column names and descriptions
    to make the names more meaningful to you.




       A primary lookup column with multiple values.




    ©2009 Microsoft Corporation.
A secondary lookup column with multiple values.

   The column name has been changed from the default name of GetID: Title to Instruments.



DELETING ITEMS AND LISTS IN A LIST RELATIONSHIP
If you want to delete items or lists in a list relationship, then you need to be aware of the consequences of
doing this operation on the source and target lists and any related columns, especially if the lists have an
enforced relationship of restrict delete or cascade delete. To maintain the integrity of the data, SharePoint
2010 may block you from deleting items even when you have delete permission. Deleting these items also
requires the backend database to temporarily lock the data when performing the delete transaction,
which can time to complete.

The following sections describe what happens in more detail.

Delete a source or target list item with an unenforced relationship When you try to delete a source
or target list item that does not have an enforced relationship, then the following occurs:

You can remove the item from the source or target list.
The related item in the target or source list is not deleted.

Delete a source list item with an enforced relationship of restrict delete When you try to delete an
item in the source list with an enforced relationship of restrict delete, then the following occurs:

You can remove the item from the source list.
The related item in the target list is not deleted

Delete a target list item with an enforced relationship of restrict delete When you try to delete an
item in the target list with an enforced relationship of restrict delete, then the following occurs:


You receive an error message that the column is used to enforce the restrict delete operation.
You cannot delete the target list item, even if you have delete permission on this item.

Delete a source list item with an enforced relationship of cascade delete When you try to delete an
item in the source list with an enforced relationship of cascade delete, then the following occurs:


You can then delete the item in the source list.
The related item in the target list is not deleted.

Delete a target list item with an enforced relationship of cascade delete When you try to delete an
item in the target list with an enforced relationship of cascade delete, then the following occurs:

You can delete the item in the target list and all related items in the source list.




©2009 Microsoft Corporation.
The delete operation occurs as a database transaction, which means that the entire delete operation must
complete to ensure that neither list is left in an invalid state.

 NOTE     In the case of a Document Library, if the item in the source list is a checked out file, both items
are still deleted.
Delete a source or target list with an unenforced relationship           When you try to delete a source and
target list with an unenforced relationship, then you can delete either the source list or the target list, just
like any other list.

Delete a source or target list with an enforced relationship of cascade or restrict delete           When you
try to delete a source or target list with an enforced relationship of cascade or restrict delete, the
following occurs:

You receive a warning that the source or target list has one or more relationships with other lists, and
those lists are displayed in the warning message.
You cannot delete the source or target list.

Restoring from the Recycle Bin        If the Recycle Bin is enabled on your site, then all deleted items are
stored in the recycle bin, and you can restore them if you need to. If the items were deleted in one
database transaction as part of a cascade delete operation, all items in the relationship are displayed, and
you can restore them as well. However, the original target and source lists must still exist, or else the items
cannot be restored.

To summarize:


When an item in the target list is deleted, a cascade delete operation also deletes all related items in the
source list.
When you try to delete an item in the target list, a restrict delete operation will prevent you from deleting
the item in the target list if it has one or more related items in the source list.
You cannot delete lists participating in an enforced relationship.



MANAGING LIST RELATIONSHIPS WHEN LISTS HAVE MANY ITEMS
When you create list relationships by using lookup columns, unique columns, and lists with enforced
relationships, you can reach a resource threshold or limit and may be blocked under the following
circumstances:

If you make a column unique in an existing list that has more items than the List View Threshold (but note
that adding one item to a list that makes the list greater than the List View Threshold is an operation that
is not usually blocked).
If you turn on Cascade Delete or Restrict Delete for a lookup field in a list that has more items than the
List View Threshold.
You have exceeded the List View Lookup Threshold, which by default is eight lookup columns.




©2009 Microsoft Corporation.
The number of items in a delete operation exceeds 1,000.



     USING EDITING PROGRAMS, SUCH AS OFFICE SHAREPOINT DESIGNER 2010
     Consider using an editing program compatible with SharePoint 2010. For example, Microsoft Office
     SharePoint Designer 2010 helps you work with list relationships by providing additional functionality and
     features. You can connect a List View Web Part or Data Form Web Part to a Related List Web Part to
     vertically display multiple values from the Lookup target list. You can also restrict insert operations as part
     of a field validation by using the List Schema editor.

     Find more information about Office SharePoint Designer 2010 in that product's Help system.



     How to create a unique and lookup column

     The following sections provide step-by-step instructions for creating a unique column and a lookup
     column.

     CREATE OR MODIFY A UNIQUE COLUMN
      WARNING       You cannot create a unique column in a list with item-level permissions defined, you cannot
     break inheritance of permissions from a list to a list item if the list contains a unique column, you cannot
     create a unique column or modify a column to be unique in a list that contains items with unique
     permissions or one that has content approval enabled, and you cannot copy a file to a library by using
     the Open with Explorer command, if that library contains a unique column.
1.   Navigate to the site containing the list for which you want to add a unique column.

2.   Click the name of the list on the Quick Launch, or click Site Actions, click View All Site Content, and
     then under the list section, click the name of the list.

3.   In the ribbon, click the List tab, and then in the Manage Views group, click Create Column.

4.   In the Columns Name box, type a name for the column.

5.   Under The type of information in this column is, click one of the following:


     Single line of text
     Multiple lines of text
     Choice Number
     Currency
     Date and Time
     Yes/No
     Lookup (single value)
     Person or Group (single value)




     ©2009 Microsoft Corporation.
6.   In the Additional Column Settings section, under Enforce unique values click Yes.


     If you select a data type that is not supported, or of you are creating a lookup column that allows multiple
     values, the Enforce unique values is not displayed.




      NOTE     A SharePoint site can be significantly modified in appearance and navigation. If you cannot
     locate an option, such as a command, button, or link, contact your administrator.

     You cannot remove the index of a unique column. If you want to remove the index, you must change the
     column from a unique column to one that allows duplicate values first, and then remove the index.
     If you try to change an existing column from duplicate values to unique values, you may be prevented
     from doing this operation if the existing column contains duplicate values. In this case, you must remove
     all the duplicate values first, and then change the column from allowing duplicate values to a unique
     column.
     If you want to change the data type of the unique column, you must do the following: change the column
     to allow duplicate values, remove the index, change the column to the other supported data type, and
     then make the column unique.



     CREATE A LOOKUP COLUMN
1.   Navigate to the site containing the list for which you want to add a lookup column.

2.   Click the name of the list on the Quick Launch, or click Site Actions, click View All Site Content, and then
     under the list section, click the name of the list.


      NOTE     A SharePoint site can be significantly modified in appearance and navigation. If you cannot
     locate an option, such as a command, button, or link, contact your administrator.
3.   In the ribbon, click the List tab, and then in the Manage Views group, click Create Column.

4.   In the Columns Name box, type a name for the column.

5.   Under The type of information in this column is, click Lookup.

6.   In the Get information from box, select a target list.

7.   In the In this column box, select a primary column.

8.   Under Add a column to show each of these additional fields, for each secondary column you want to
     add, click the check box next to the column name. Only columns with supported data types are listed.

9.   Later on if you want to add or remove secondary columns, modify the lookup column and make the
     selections you want.

             NOTE     You cannot index a secondary column nor can you make a secondary column unique.




     ©2009 Microsoft Corporation.
10. If you want the lookup columns to display in the default view, select Add to default view.

11. To create an enforced relationship, select Enforce relationship behavior and then click Restrict
    Delete or Cascade Delete.

12. Click OK.




    ©2009 Microsoft Corporation.

More Related Content

What's hot

Utility Services Mortuary
Utility Services MortuaryUtility Services Mortuary
Utility Services MortuaryAakashSimon
 
Final hospital planning and layout ppt
Final hospital planning and layout pptFinal hospital planning and layout ppt
Final hospital planning and layout pptSandeep Singh
 
FDA Guidelines for Medical Devices.pdf
FDA Guidelines for Medical Devices.pdfFDA Guidelines for Medical Devices.pdf
FDA Guidelines for Medical Devices.pdfBalaji Paulraj
 
Pmk no.-1691-ttg-keselamatan-pasien-rumah-sakit1 (1)
Pmk no.-1691-ttg-keselamatan-pasien-rumah-sakit1 (1)Pmk no.-1691-ttg-keselamatan-pasien-rumah-sakit1 (1)
Pmk no.-1691-ttg-keselamatan-pasien-rumah-sakit1 (1)khusnuleza
 
Clinical Medical Writing | Medical Writing Courses | Medical Writer
Clinical Medical Writing | Medical Writing Courses |  Medical WriterClinical Medical Writing | Medical Writing Courses |  Medical Writer
Clinical Medical Writing | Medical Writing Courses | Medical WriterInfocusRxMedicalWriting
 
BAGLADESH MEDICAL & DENTAL COUNSIL (BMDC).ppt
BAGLADESH MEDICAL & DENTAL COUNSIL (BMDC).pptBAGLADESH MEDICAL & DENTAL COUNSIL (BMDC).ppt
BAGLADESH MEDICAL & DENTAL COUNSIL (BMDC).pptMShahinUddinKazem
 
Mutiple basic approach selective controls
Mutiple basic approach selective controlsMutiple basic approach selective controls
Mutiple basic approach selective controlsawantika diwan
 
Директива 2014/32/EU: «Измерительные приборы»
Директива 2014/32/EU: «Измерительные приборы»Директива 2014/32/EU: «Измерительные приборы»
Директива 2014/32/EU: «Измерительные приборы»Volodymyr Holomb
 
Inpatient dpt of Hospital (IPD)
Inpatient dpt of Hospital (IPD)Inpatient dpt of Hospital (IPD)
Inpatient dpt of Hospital (IPD)Vidya Neelesh
 
Electrical safety in biophysical measurements
Electrical safety in biophysical measurementsElectrical safety in biophysical measurements
Electrical safety in biophysical measurementsJaya Yadav
 
Orthopaedics opd workflow
Orthopaedics opd workflowOrthopaedics opd workflow
Orthopaedics opd workflownisaiims
 
INM 22 FEB 2023.pptx
INM 22 FEB 2023.pptxINM 22 FEB 2023.pptx
INM 22 FEB 2023.pptxssuser312fce1
 
Health record practices in hospital & importance of various indices
Health record practices in hospital & importance of various indicesHealth record practices in hospital & importance of various indices
Health record practices in hospital & importance of various indicesDr CB Narayan
 

What's hot (20)

Utility Services Mortuary
Utility Services MortuaryUtility Services Mortuary
Utility Services Mortuary
 
Final hospital planning and layout ppt
Final hospital planning and layout pptFinal hospital planning and layout ppt
Final hospital planning and layout ppt
 
HOSPITAL PLANNING
HOSPITAL PLANNINGHOSPITAL PLANNING
HOSPITAL PLANNING
 
Opd design and process
Opd design and processOpd design and process
Opd design and process
 
FDA Guidelines for Medical Devices.pdf
FDA Guidelines for Medical Devices.pdfFDA Guidelines for Medical Devices.pdf
FDA Guidelines for Medical Devices.pdf
 
Pmk no.-1691-ttg-keselamatan-pasien-rumah-sakit1 (1)
Pmk no.-1691-ttg-keselamatan-pasien-rumah-sakit1 (1)Pmk no.-1691-ttg-keselamatan-pasien-rumah-sakit1 (1)
Pmk no.-1691-ttg-keselamatan-pasien-rumah-sakit1 (1)
 
Clinical Medical Writing | Medical Writing Courses | Medical Writer
Clinical Medical Writing | Medical Writing Courses |  Medical WriterClinical Medical Writing | Medical Writing Courses |  Medical Writer
Clinical Medical Writing | Medical Writing Courses | Medical Writer
 
BAGLADESH MEDICAL & DENTAL COUNSIL (BMDC).ppt
BAGLADESH MEDICAL & DENTAL COUNSIL (BMDC).pptBAGLADESH MEDICAL & DENTAL COUNSIL (BMDC).ppt
BAGLADESH MEDICAL & DENTAL COUNSIL (BMDC).ppt
 
Mutiple basic approach selective controls
Mutiple basic approach selective controlsMutiple basic approach selective controls
Mutiple basic approach selective controls
 
Директива 2014/32/EU: «Измерительные приборы»
Директива 2014/32/EU: «Измерительные приборы»Директива 2014/32/EU: «Измерительные приборы»
Директива 2014/32/EU: «Измерительные приборы»
 
Inpatient dpt of Hospital (IPD)
Inpatient dpt of Hospital (IPD)Inpatient dpt of Hospital (IPD)
Inpatient dpt of Hospital (IPD)
 
Electrical safety in biophysical measurements
Electrical safety in biophysical measurementsElectrical safety in biophysical measurements
Electrical safety in biophysical measurements
 
Green hospitals
Green hospitalsGreen hospitals
Green hospitals
 
Medical audit
Medical auditMedical audit
Medical audit
 
Orthopaedics opd workflow
Orthopaedics opd workflowOrthopaedics opd workflow
Orthopaedics opd workflow
 
INM 22 FEB 2023.pptx
INM 22 FEB 2023.pptxINM 22 FEB 2023.pptx
INM 22 FEB 2023.pptx
 
Opd
OpdOpd
Opd
 
Ich gcp
Ich gcpIch gcp
Ich gcp
 
Health record practices in hospital & importance of various indices
Health record practices in hospital & importance of various indicesHealth record practices in hospital & importance of various indices
Health record practices in hospital & importance of various indices
 
site selections
site selectionssite selections
site selections
 

Similar to Create List Relationships by Using Unique and Lookup Columns - SharePoint 2010 - EPC Group

SharePoint 2010 List of List Improvements
SharePoint 2010 List of List ImprovementsSharePoint 2010 List of List Improvements
SharePoint 2010 List of List ImprovementsK.Mohamed Faizal
 
SharePoint 2010 list improvements
SharePoint 2010 list improvementsSharePoint 2010 list improvements
SharePoint 2010 list improvementsK.Mohamed Faizal
 
Introduction to Lists SharePoint 2010 - EPC Group
Introduction to Lists SharePoint 2010  - EPC GroupIntroduction to Lists SharePoint 2010  - EPC Group
Introduction to Lists SharePoint 2010 - EPC GroupEPC Group
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)Ehtisham Ali
 
Workshop Presetation.pptx
Workshop Presetation.pptxWorkshop Presetation.pptx
Workshop Presetation.pptxJanineCanlas1
 
Getting Started with SharePoint Status Indicators - EPC Group
Getting Started with SharePoint Status Indicators - EPC GroupGetting Started with SharePoint Status Indicators - EPC Group
Getting Started with SharePoint Status Indicators - EPC GroupEPC Group
 
SharePoint Lists 101 (Text)
SharePoint Lists 101 (Text)SharePoint Lists 101 (Text)
SharePoint Lists 101 (Text)Thomas Duff
 
MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access TutorialvirtualMaryam
 
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1 "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1 Andriy Krayniy
 
Excel database
Excel databaseExcel database
Excel databasegdcs
 
Microsoft excel training
Microsoft excel trainingMicrosoft excel training
Microsoft excel trainingEmilyE120
 
Access tips access and sql part 5 more instant queries 1
Access tips  access and sql part 5  more instant queries 1Access tips  access and sql part 5  more instant queries 1
Access tips access and sql part 5 more instant queries 1quest2900
 

Similar to Create List Relationships by Using Unique and Lookup Columns - SharePoint 2010 - EPC Group (20)

SharePoint 2010 List of List Improvements
SharePoint 2010 List of List ImprovementsSharePoint 2010 List of List Improvements
SharePoint 2010 List of List Improvements
 
SharePoint 2010 list improvements
SharePoint 2010 list improvementsSharePoint 2010 list improvements
SharePoint 2010 list improvements
 
Introduction to Lists SharePoint 2010 - EPC Group
Introduction to Lists SharePoint 2010  - EPC GroupIntroduction to Lists SharePoint 2010  - EPC Group
Introduction to Lists SharePoint 2010 - EPC Group
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
 
Charts and pivot tables
Charts and pivot tablesCharts and pivot tables
Charts and pivot tables
 
Advanced Excel, Day 1
Advanced Excel, Day 1Advanced Excel, Day 1
Advanced Excel, Day 1
 
Workshop Presetation.pptx
Workshop Presetation.pptxWorkshop Presetation.pptx
Workshop Presetation.pptx
 
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Cis145 Final Review
 
Toa study guide
Toa study guideToa study guide
Toa study guide
 
Getting Started with SharePoint Status Indicators - EPC Group
Getting Started with SharePoint Status Indicators - EPC GroupGetting Started with SharePoint Status Indicators - EPC Group
Getting Started with SharePoint Status Indicators - EPC Group
 
SharePoint Lists 101 (Text)
SharePoint Lists 101 (Text)SharePoint Lists 101 (Text)
SharePoint Lists 101 (Text)
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Cis145 Final Review
 
MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access Tutorial
 
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1 "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
 
Advanced Excel ppt
Advanced Excel pptAdvanced Excel ppt
Advanced Excel ppt
 
Chapter.07
Chapter.07Chapter.07
Chapter.07
 
Excel database
Excel databaseExcel database
Excel database
 
Microsoft excel training
Microsoft excel trainingMicrosoft excel training
Microsoft excel training
 
Access tips access and sql part 5 more instant queries 1
Access tips  access and sql part 5  more instant queries 1Access tips  access and sql part 5  more instant queries 1
Access tips access and sql part 5 more instant queries 1
 

More from EPC Group

Power BI vs Tableau - An Overview from EPC Group.pptx
Power BI vs Tableau - An Overview from EPC Group.pptxPower BI vs Tableau - An Overview from EPC Group.pptx
Power BI vs Tableau - An Overview from EPC Group.pptxEPC Group
 
EPC Group Intune Practice and Capabilities Overview
EPC Group Intune Practice and Capabilities OverviewEPC Group Intune Practice and Capabilities Overview
EPC Group Intune Practice and Capabilities OverviewEPC Group
 
Pop the Hood on Microsoft Teams - EPC Group
Pop the Hood on Microsoft Teams - EPC GroupPop the Hood on Microsoft Teams - EPC Group
Pop the Hood on Microsoft Teams - EPC GroupEPC Group
 
Windows Server 2012 Deep-Dive - EPC Group
Windows Server 2012 Deep-Dive - EPC GroupWindows Server 2012 Deep-Dive - EPC Group
Windows Server 2012 Deep-Dive - EPC GroupEPC Group
 
Understanding Windows Azure’s Active Directory (AD) and PowerShell Tools
Understanding Windows Azure’s Active Directory (AD) and PowerShell ToolsUnderstanding Windows Azure’s Active Directory (AD) and PowerShell Tools
Understanding Windows Azure’s Active Directory (AD) and PowerShell ToolsEPC Group
 
PowerShell with SharePoint 2013 and Office 365 - EPC Group
PowerShell with SharePoint 2013 and Office 365 - EPC GroupPowerShell with SharePoint 2013 and Office 365 - EPC Group
PowerShell with SharePoint 2013 and Office 365 - EPC GroupEPC Group
 
Understanding Office 365’s Identity Solutions: Deep Dive - EPC Group
Understanding Office 365’s Identity Solutions: Deep Dive - EPC GroupUnderstanding Office 365’s Identity Solutions: Deep Dive - EPC Group
Understanding Office 365’s Identity Solutions: Deep Dive - EPC GroupEPC Group
 
System Center 2012 SP1 - Overview - EPC Group
System Center 2012 SP1 - Overview - EPC GroupSystem Center 2012 SP1 - Overview - EPC Group
System Center 2012 SP1 - Overview - EPC GroupEPC Group
 
Windows Azure Pack Enabling Virtual Machines - IaaS & Virtual Machine Role - ...
Windows Azure Pack Enabling Virtual Machines - IaaS & Virtual Machine Role - ...Windows Azure Pack Enabling Virtual Machines - IaaS & Virtual Machine Role - ...
Windows Azure Pack Enabling Virtual Machines - IaaS & Virtual Machine Role - ...EPC Group
 
Lync 2013 - Audio - Quick Reference - 2 Page Reference - EPC Group
Lync 2013 - Audio - Quick Reference - 2 Page Reference - EPC GroupLync 2013 - Audio - Quick Reference - 2 Page Reference - EPC Group
Lync 2013 - Audio - Quick Reference - 2 Page Reference - EPC GroupEPC Group
 
Lync 2013 - Sharing and Collaboration - Quick Reference 2 Pager
Lync 2013 - Sharing and Collaboration - Quick Reference 2 PagerLync 2013 - Sharing and Collaboration - Quick Reference 2 Pager
Lync 2013 - Sharing and Collaboration - Quick Reference 2 PagerEPC Group
 
Windows Server 2012 Deep-Dive - EPC Group
Windows Server 2012 Deep-Dive - EPC GroupWindows Server 2012 Deep-Dive - EPC Group
Windows Server 2012 Deep-Dive - EPC GroupEPC Group
 
Hyper-V’s Virtualization Enhancements - EPC Group
Hyper-V’s Virtualization Enhancements - EPC GroupHyper-V’s Virtualization Enhancements - EPC Group
Hyper-V’s Virtualization Enhancements - EPC GroupEPC Group
 
High Level Overview of Windows Azure - EPC Group
High Level Overview of Windows Azure - EPC GroupHigh Level Overview of Windows Azure - EPC Group
High Level Overview of Windows Azure - EPC GroupEPC Group
 
SharePoint 2013 and Office 365 External Sharing
SharePoint 2013 and Office 365 External SharingSharePoint 2013 and Office 365 External Sharing
SharePoint 2013 and Office 365 External SharingEPC Group
 
BizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC GroupBizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC GroupEPC Group
 
BizTalk Sever 2010 - Basic Principles of Maps - EPC Group
BizTalk Sever 2010 - Basic Principles of Maps - EPC GroupBizTalk Sever 2010 - Basic Principles of Maps - EPC Group
BizTalk Sever 2010 - Basic Principles of Maps - EPC GroupEPC Group
 
EPC Group and Continental Airlines ECM Case Study - SharePoint 2007 Global Study
EPC Group and Continental Airlines ECM Case Study - SharePoint 2007 Global StudyEPC Group and Continental Airlines ECM Case Study - SharePoint 2007 Global Study
EPC Group and Continental Airlines ECM Case Study - SharePoint 2007 Global StudyEPC Group
 
Driving End User Adoption in SharePoint 2013 & 2010 - EPC Group
Driving End User Adoption in SharePoint 2013 & 2010 - EPC GroupDriving End User Adoption in SharePoint 2013 & 2010 - EPC Group
Driving End User Adoption in SharePoint 2013 & 2010 - EPC GroupEPC Group
 
Join EPC Group's Monthly Newsletter
Join EPC Group's Monthly NewsletterJoin EPC Group's Monthly Newsletter
Join EPC Group's Monthly NewsletterEPC Group
 

More from EPC Group (20)

Power BI vs Tableau - An Overview from EPC Group.pptx
Power BI vs Tableau - An Overview from EPC Group.pptxPower BI vs Tableau - An Overview from EPC Group.pptx
Power BI vs Tableau - An Overview from EPC Group.pptx
 
EPC Group Intune Practice and Capabilities Overview
EPC Group Intune Practice and Capabilities OverviewEPC Group Intune Practice and Capabilities Overview
EPC Group Intune Practice and Capabilities Overview
 
Pop the Hood on Microsoft Teams - EPC Group
Pop the Hood on Microsoft Teams - EPC GroupPop the Hood on Microsoft Teams - EPC Group
Pop the Hood on Microsoft Teams - EPC Group
 
Windows Server 2012 Deep-Dive - EPC Group
Windows Server 2012 Deep-Dive - EPC GroupWindows Server 2012 Deep-Dive - EPC Group
Windows Server 2012 Deep-Dive - EPC Group
 
Understanding Windows Azure’s Active Directory (AD) and PowerShell Tools
Understanding Windows Azure’s Active Directory (AD) and PowerShell ToolsUnderstanding Windows Azure’s Active Directory (AD) and PowerShell Tools
Understanding Windows Azure’s Active Directory (AD) and PowerShell Tools
 
PowerShell with SharePoint 2013 and Office 365 - EPC Group
PowerShell with SharePoint 2013 and Office 365 - EPC GroupPowerShell with SharePoint 2013 and Office 365 - EPC Group
PowerShell with SharePoint 2013 and Office 365 - EPC Group
 
Understanding Office 365’s Identity Solutions: Deep Dive - EPC Group
Understanding Office 365’s Identity Solutions: Deep Dive - EPC GroupUnderstanding Office 365’s Identity Solutions: Deep Dive - EPC Group
Understanding Office 365’s Identity Solutions: Deep Dive - EPC Group
 
System Center 2012 SP1 - Overview - EPC Group
System Center 2012 SP1 - Overview - EPC GroupSystem Center 2012 SP1 - Overview - EPC Group
System Center 2012 SP1 - Overview - EPC Group
 
Windows Azure Pack Enabling Virtual Machines - IaaS & Virtual Machine Role - ...
Windows Azure Pack Enabling Virtual Machines - IaaS & Virtual Machine Role - ...Windows Azure Pack Enabling Virtual Machines - IaaS & Virtual Machine Role - ...
Windows Azure Pack Enabling Virtual Machines - IaaS & Virtual Machine Role - ...
 
Lync 2013 - Audio - Quick Reference - 2 Page Reference - EPC Group
Lync 2013 - Audio - Quick Reference - 2 Page Reference - EPC GroupLync 2013 - Audio - Quick Reference - 2 Page Reference - EPC Group
Lync 2013 - Audio - Quick Reference - 2 Page Reference - EPC Group
 
Lync 2013 - Sharing and Collaboration - Quick Reference 2 Pager
Lync 2013 - Sharing and Collaboration - Quick Reference 2 PagerLync 2013 - Sharing and Collaboration - Quick Reference 2 Pager
Lync 2013 - Sharing and Collaboration - Quick Reference 2 Pager
 
Windows Server 2012 Deep-Dive - EPC Group
Windows Server 2012 Deep-Dive - EPC GroupWindows Server 2012 Deep-Dive - EPC Group
Windows Server 2012 Deep-Dive - EPC Group
 
Hyper-V’s Virtualization Enhancements - EPC Group
Hyper-V’s Virtualization Enhancements - EPC GroupHyper-V’s Virtualization Enhancements - EPC Group
Hyper-V’s Virtualization Enhancements - EPC Group
 
High Level Overview of Windows Azure - EPC Group
High Level Overview of Windows Azure - EPC GroupHigh Level Overview of Windows Azure - EPC Group
High Level Overview of Windows Azure - EPC Group
 
SharePoint 2013 and Office 365 External Sharing
SharePoint 2013 and Office 365 External SharingSharePoint 2013 and Office 365 External Sharing
SharePoint 2013 and Office 365 External Sharing
 
BizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC GroupBizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC Group
 
BizTalk Sever 2010 - Basic Principles of Maps - EPC Group
BizTalk Sever 2010 - Basic Principles of Maps - EPC GroupBizTalk Sever 2010 - Basic Principles of Maps - EPC Group
BizTalk Sever 2010 - Basic Principles of Maps - EPC Group
 
EPC Group and Continental Airlines ECM Case Study - SharePoint 2007 Global Study
EPC Group and Continental Airlines ECM Case Study - SharePoint 2007 Global StudyEPC Group and Continental Airlines ECM Case Study - SharePoint 2007 Global Study
EPC Group and Continental Airlines ECM Case Study - SharePoint 2007 Global Study
 
Driving End User Adoption in SharePoint 2013 & 2010 - EPC Group
Driving End User Adoption in SharePoint 2013 & 2010 - EPC GroupDriving End User Adoption in SharePoint 2013 & 2010 - EPC Group
Driving End User Adoption in SharePoint 2013 & 2010 - EPC Group
 
Join EPC Group's Monthly Newsletter
Join EPC Group's Monthly NewsletterJoin EPC Group's Monthly Newsletter
Join EPC Group's Monthly Newsletter
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Create List Relationships by Using Unique and Lookup Columns - SharePoint 2010 - EPC Group

  • 1. Create list relationships by using unique and lookup columns Applies to: Microsoft SharePoint Foundation 2010 , SharePoint Server 2010 In SharePoint 2010, you can create relationships between lists by using a combination of unique columns, lookup columns, and relationship enforcement (cascade and restrict delete), all of which enhance your ability to create more sophisticated business solutions and help preserve the integrity of your data. Overview of list relationships The following sections provides important background information about creating relationships between source and target lists, creating unique and lookup columns, enforcing list relationship behavior, adding primary and secondary lookup columns, viewing, editing, and deleting items within list relationships, managing list relationships when lists have many items, and the additional benefits of using SharePoint editing programs, such as Microsoft Office SharePoint Designer 2010. Using unique and lookup columns to process gift orders. Each list has unique columns to ensure that the correct data is matched The Items list is the source list and the Orders list is the target list.. The primary lookup column in the source list "looks up" the Order ID column in the target list based on a matching value.
  • 2. A secondary lookup column in the source list automatically inserts the Orders Description column from the target list. CREATING UNIQUE COLUMNS When you create a column, you can specify that the column must contain unique values. This means that the list cannot have any duplicate values in that column. You cannot add a list item that contains a duplicate value, modify an existing list item that would result in creating a duplicate value, or restore an item from the Recycle Bin if it would result in a duplicate value. Furthermore, if you create a lookup column in a source list, and you define that column to be unique, the column in the target list must not contain duplicate values. NOTE Uniqueness is not case-sensitive, so for example, ORD-231 and ord-231 are considered duplicate values. A unique column must also have an index. When you create a unique column, SharePoint 2010 prompts you to create the index and automatically creates one when you click OK. Once a unique column has an index, you cannot remove the index from that column, unless you first redefine the column to allow duplicate values. The following table summarizes what column types can and cannot be used to create unique columns. SUPPORTED COLUMN TYPES UNSUPPORTED COLUMN TYPES Single line of text Multiple lines of text Choice (single value) Choice (multi-valued) Number Calculated Currency Hyperlink or Picture Date and Time Custom Columns Lookup (single value) Lookup (multi-valued) Person or Group (single value) Person or Group (multi-valued) Yes/No CREATING LOOKUP COLUMNS To create a relationship between two lists, in the source list, you create a lookup column that retrieves (or "looks up") one or more values from a target list if those values match the value in the lookup column in ©2009 Microsoft Corporation.
  • 3. the source list. Once you create this lookup column (the primary column), you can continue to add additional columns (secondary columns) from the target list to the source list, as long as those additional columns have a supported data type described below. The following table summarizes what column types can and cannot be used to create lookup columns. SUPPORTED COLUMN TYPES UNSUPPORTED COLUMN TYPES Single line of text Currency Multiple lines of text Lookup Choice Person or Group Number Calculated Date and Time Hyperlink or Picture Yes/No Custom Columns There are two types of lookup columns that you can create, a lookup column with an enforced relationship and a lookup column with an unenforced relationship. A lookup column with an enforced relationship In a lookup column with an enforced relationship (also called referential integrity), you can lookup single values and maintain the integrity of your data in the target list in one of two ways: Cascade Delete When an item in the target list is deleted, the related item or items in the source list are also deleted. In this case, you want to make sure that all related items are deleted as part of one database transaction. For example, if you delete an order in a target list, you can ensure that the corresponding order items in the source list is also deleted. You don't want to have order items without a corresponding order, because that would create "orphan" order items that might cause confusion later on. Restrict Delete When you try to delete an item in the target list, and it has one or more related items in the source list, you are prevented from deleting the item in the target list. In this case, you want to ensure that the related item in the target list is preserved. For example, someone tries to delete an order item from a target list, a customer may still have that order pending, and you want to prevent that delete operation from occurring until the order has been processed. You don't want the customer’s order to be accidentally deleted because that would affect your ability to complete the order. ©2009 Microsoft Corporation.
  • 4. A cascade delete operation ensures all related items are deleted in one database transaction. A restrict delete operation prevents deleting items in the target list if related source list items exist. In short, enforcing a list relationship behavior helps keep your data valid and helps prevent inconsistencies that might cause problems down the road. NOTE You must have Manage Lists permission on a list to create or modify an enforced relationship. A lookup column that enforces a relationship must also have an index. When you create a lookup column that enforces a relationship, SharePoint 2010 prompts you to create the index, and automatically creates one when you click OK. Once a lookup column that enforces a relationship has an index, you cannot remove the index from that column, unless you first remove the enforced relationship. A lookup column with an unenforced relationship In a lookup column with an unenforced relationship, from the source list, you can lookup single or multiple values in the target list. Also, when you delete an item in the source list, as long as you have delete permission on the list, there are no additional delete restrictions or delete operations that occur in the target list. ©2009 Microsoft Corporation.
  • 5. Overview of list relationships The following sections provides important background information about creating relationships between source and target lists, creating unique and lookup columns, enforcing list relationship behavior, adding primary and secondary lookup columns, viewing, editing, and deleting items within list relationships, managing list relationships when lists have many items, and the additional benefits of using SharePoint editing programs, such as Microsoft Office SharePoint Designer 2010. Using unique and lookup columns to process gift orders. Each list has unique columns to ensure that the correct data is matched The Items list is the source list and the Orders list is the target list.. The primary lookup column in the source list "looks up" the Order ID column in the target list based on a matching value. A secondary lookup column in the source list automatically inserts the Orders Description column from the target list. CREATING UNIQUE COLUMNS When you create a column, you can specify that the column must contain unique values. This means that the list cannot have any duplicate values in that column. You cannot add a list item that contains a duplicate value, modify an existing list item that would result in creating a duplicate value, or restore an ©2009 Microsoft Corporation.
  • 6. item from the Recycle Bin if it would result in a duplicate value. Furthermore, if you create a lookup column in a source list, and you define that column to be unique, the column in the target list must not contain duplicate values. NOTE Uniqueness is not case-sensitive, so for example, ORD-231 and ord-231 are considered duplicate values. A unique column must also have an index. When you create a unique column, SharePoint 2010 prompts you to create the index and automatically creates one when you click OK. Once a unique column has an index, you cannot remove the index from that column, unless you first redefine the column to allow duplicate values. The following table summarizes what column types can and cannot be used to create unique columns. SUPPORTED COLUMN TYPES UNSUPPORTED COLUMN TYPES Single line of text Multiple lines of text Choice (single value) Choice (multi-valued) Number Calculated Currency Hyperlink or Picture Date and Time Custom Columns Lookup (single value) Lookup (multi-valued) Person or Group (single value) Person or Group (multi-valued) Yes/No CREATING LOOKUP COLUMNS To create a relationship between two lists, in the source list, you create a lookup column that retrieves (or "looks up") one or more values from a target list if those values match the value in the lookup column in the source list. Once you create this lookup column (the primary column), you can continue to add additional columns (secondary columns) from the target list to the source list, as long as those additional columns have a supported data type described below. The following table summarizes what column types can and cannot be used to create lookup columns. SUPPORTED COLUMN TYPES UNSUPPORTED COLUMN TYPES ©2009 Microsoft Corporation.
  • 7. Single line of text Currency Multiple lines of text Lookup Choice Person or Group Number Calculated Date and Time Hyperlink or Picture Yes/No Custom Columns There are two types of lookup columns that you can create, a lookup column with an enforced relationship and a lookup column with an unenforced relationship. A lookup column with an enforced relationship In a lookup column with an enforced relationship (also called referential integrity), you can lookup single values and maintain the integrity of your data in the target list in one of two ways: Cascade Delete When an item in the target list is deleted, the related item or items in the source list are also deleted. In this case, you want to make sure that all related items are deleted as part of one database transaction. For example, if you delete an order in a target list, you can ensure that the corresponding order items in the source list is also deleted. You don't want to have order items without a corresponding order, because that would create "orphan" order items that might cause confusion later on. Restrict Delete When you try to delete an item in the target list, and it has one or more related items in the source list, you are prevented from deleting the item in the target list. In this case, you want to ensure that the related item in the target list is preserved. For example, someone tries to delete an order item from a target list, a customer may still have that order pending, and you want to prevent that delete operation from occurring until the order has been processed. You don't want the customer’s order to be accidentally deleted because that would affect your ability to complete the order. ©2009 Microsoft Corporation.
  • 8. A cascade delete operation ensures all related items are deleted in one database transaction. A restrict delete operation prevents deleting items in the target list if related source list items exist. In short, enforcing a list relationship behavior helps keep your data valid and helps prevent inconsistencies that might cause problems down the road. NOTE You must have Manage Lists permission on a list to create or modify an enforced relationship. A lookup column that enforces a relationship must also have an index. When you create a lookup column that enforces a relationship, SharePoint 2010 prompts you to create the index, and automatically creates one when you click OK. Once a lookup column that enforces a relationship has an index, you cannot remove the index from that column, unless you first remove the enforced relationship. A lookup column with an unenforced relationship In a lookup column with an unenforced relationship, from the source list, you can lookup single or multiple values in the target list. Also, when you delete an item in the source list, as long as you have delete permission on the list, there are no additional delete restrictions or delete operations that occur in the target list. ©2009 Microsoft Corporation.
  • 9. VIEWING AND EDITING ITEMS IN LIST RELATIONSHIPS One of the beneficial effects of creating list relationships is that you can display and edit columns from two or more lists, on one page. When you create a lookup column in a source list, the primary column displays values from the target list column, but you can also specify that additional, secondary columns from the target list also display alongside the primary column and the other source list columns. The primary column value is a link which you can click to the display all the column values of that item in the target list. Each secondary column value from the target list displays as text in the source list column. If you create a lookup column with multiple values, each column from the target list, whether primary or secondary, display their multiple corresponding values delimited by semicolons. You can manipulate these primary and secondary columns in list view in much the same way as the columns from the source list, by, for example, adding, removing, filtering and sorting them. The primary column name is a name you provide when you create the lookup column. By default, each secondary column name follows a standard naming convention of <primary column name in source list>: <column name in target list>. Changing the name of the primary column, therefore, changes the names of all secondary columns. However, you can modify the default secondary column names and descriptions to make the names more meaningful to you. A primary lookup column with multiple values. A secondary lookup column with multiple values. ©2009 Microsoft Corporation.
  • 10. The column name has been changed from the default name of GetID: Title toInstruments. TOP OF PAGE DELETING ITEMS AND LISTS IN A LIST RELATIONSHIP If you want to delete items or lists in a list relationship, then you need to be aware of the consequences of doing this operation on the source and target lists and any related columns, especially if the lists have an enforced relationship of restrict delete or cascade delete. To maintain the integrity of the data, SharePoint 2010 may block you from deleting items even when you have delete permission. Deleting these items also requires the backend database to temporarily lock the data when performing the delete transaction, which can time to complete. The following sections describe what happens in more detail. Delete a source or target list item with an unenforced relationship When you try to delete a source or target list item that does not have an enforced relationship, then the following occurs: You can remove the item from the source or target list. The related item in the target or source list is not deleted. Delete a source list item with an enforced relationship of restrict delete When you try to delete an item in the source list with an enforced relationship of restrict delete, then the following occurs: You can remove the item from the source list. The related item in the target list is not deleted Delete a target list item with an enforced relationship of restrict delete When you try to delete an item in the target list with an enforced relationship of restrict delete, then the following occurs: You receive an error message that the column is used to enforce the restrict delete operation. You cannot delete the target list item, even if you have delete permission on this item. Delete a source list item with an enforced relationship of cascade delete When you try to delete an item in the source list with an enforced relationship of cascade delete, then the following occurs: You can then delete the item in the source list. The related item in the target list is not deleted. Delete a target list item with an enforced relationship of cascade delete When you try to delete an item in the target list with an enforced relationship of cascade delete, then the following occurs: You can delete the item in the target list and all related items in the source list. The delete operation occurs as a database transaction, which means that the entire delete operation must complete to ensure that neither list is left in an invalid state. ©2009 Microsoft Corporation.
  • 11. NOTE In the case of a Document Library, if the item in the source list is a checked out file, both items are still deleted. Delete a source or target list with an unenforced relationship When you try to delete a source and target list with an unenforced relationship, then you can delete either the source list or the target list, just like any other list. Delete a source or target list with an enforced relationship of cascade or restrict delete When you try to delete a source or target list with an enforced relationship of cascade or restrict delete, the following occurs: You receive a warning that the source or target list has one or more relationships with other lists, and those lists are displayed in the warning message. You cannot delete the source or target list. Restoring from the Recycle Bin If the Recycle Bin is enabled on your site, then all deleted items are stored in the recycle bin, and you can restore them if you need to. If the items were deleted in one database transaction as part of a cascade delete operation, all items in the relationship are displayed, and you can restore them as well. However, the original target and source lists must still exist, or else the items cannot be restored. To summarize: When an item in the target list is deleted, a cascade delete operation also deletes all related items in the source list. When you try to delete an item in the target list, a restrict delete operation will prevent you from deleting the item in the target list if it has one or more related items in the source list. You cannot delete lists participating in an enforced relationship. MANAGING LIST RELATIONSHIPS WHEN LISTS HAVE MANY ITEMS When you create list relationships by using lookup columns, unique columns, and lists with enforced relationships, you can reach a resource threshold or limit and may be blocked under the following circumstances: If you make a column unique in an existing list that has more items than the List View Threshold (but note that adding one item to a list that makes the list greater than the List View Threshold is an operation that is not usually blocked). If you turn on Cascade Delete or Restrict Delete for a lookup field in a list that has more items than the List View Threshold. You have exceeded the List View Lookup Threshold, which by default is eight lookup columns. The number of items in a delete operation exceeds 1,000. ©2009 Microsoft Corporation.
  • 12. USING EDITING PROGRAMS, SUCH AS OFFICE SHAREPOINT DESIGNER 2010 Consider using an editing program compatible with SharePoint 2010. For example, Microsoft Office SharePoint Designer 2010 helps you work with list relationships by providing additional functionality and features. You can connect a List View Web Part or Data Form Web Part to a Related List Web Part to vertically display multiple values from the Lookup target list. You can also restrict insert operations as part of a field validation by using the List Schema editor. Find more information about Office SharePoint Designer 2010 in that product's Help system. How to create a unique and lookup column The following sections provide step-by-step instructions for creating a unique column and a lookup column. CREATE OR MODIFY A UNIQUE COLUMN WARNING You cannot create a unique column in a list with item-level permissions defined, you cannot break inheritance of permissions from a list to a list item if the list contains a unique column, you cannot create a unique column or modify a column to be unique in a list that contains items with unique permissions or one that has content approval enabled, and you cannot copy a file to a library by using the Open with Explorer command, if that library contains a unique column. 1. Navigate to the site containing the list for which you want to add a unique column. 2. Click the name of the list on the Quick Launch, or click Site Actions, click View All Site Content, and then under the list section, click the name of the list. 3. In the ribbon, click the List tab, and then in the Manage Views group, click Create Column. 4. In the Columns Name box, type a name for the column. 5. Under The type of information in this column is, click one of the following: Single line of text Multiple lines of text Choice Number Currency Date and Time Yes/No Lookup (single value) Person or Group (single value) 6. In the Additional Column Settings section, under Enforce unique values click Yes. If you select a data type that is not supported, or of you are creating a lookup column that allows multiple values, the Enforce unique values is not displayed. ©2009 Microsoft Corporation.
  • 13. NOTE A SharePoint site can be significantly modified in appearance and navigation. If you cannot locate an option, such as a command, button, or link, contact your administrator. You cannot remove the index of a unique column. If you want to remove the index, you must change the column from a unique column to one that allows duplicate values first, and then remove the index. If you try to change an existing column from duplicate values to unique values, you may be prevented from doing this operation if the existing column contains duplicate values. In this case, you must remove all the duplicate values first, and then change the column from allowing duplicate values to a unique column. If you want to change the data type of the unique column, you must do the following: change the column to allow duplicate values, remove the index, change the column to the other supported data type, and then make the column unique. CREATE A LOOKUP COLUMN 1. Navigate to the site containing the list for which you want to add a lookup column. 2. Click the name of the list on the Quick Launch, or click Site Actions, click View All Site Content, and then under the list section, click the name of the list. NOTE A SharePoint site can be significantly modified in appearance and navigation. If you cannot locate an option, such as a command, button, or link, contact your administrator. 3. In the ribbon, click the List tab, and then in the Manage Views group, click Create Column. 4. In the Columns Name box, type a name for the column. 5. Under The type of information in this column is, click Lookup. 6. In the Get information from box, select a target list. 7. In the In this column box, select a primary column. 8. Under Add a column to show each of these additional fields, for each secondary column you want to add, click the check box next to the column name. Only columns with supported data types are listed. 9. Later on if you want to add or remove secondary columns, modify the lookup column and make the selections you want. NOTE You cannot index a secondary column nor can you make a secondary column unique. 10. If you want the lookup columns to display in the default view, select Add to default view. 11. To create an enforced relationship, select Enforce relationship behavior and then click Restrict Delete or Cascade Delete. ©2009 Microsoft Corporation.
  • 14. 12. Click OK. VIEWING AND EDITING ITEMS IN LIST RELATIONSHIPS One of the beneficial effects of creating list relationships is that you can display and edit columns from two or more lists, on one page. When you create a lookup column in a source list, the primary column displays values from the target list column, but you can also specify that additional, secondary columns from the target list also display alongside the primary column and the other source list columns. The primary column value is a link which you can click to the display all the column values of that item in the target list. Each secondary column value from the target list displays as text in the source list column. If you create a lookup column with multiple values, each column from the target list, whether primary or secondary, display their multiple corresponding values delimited by semicolons. You can manipulate these primary and secondary columns in list view in much the same way as the columns from the source list, by, for example, adding, removing, filtering and sorting them. The primary column name is a name you provide when you create the lookup column. By default, each secondary column name follows a standard naming convention of <primary column name in source list>: <column name in target list>. Changing the name of the primary column, therefore, changes the names of all secondary columns. However, you can modify the default secondary column names and descriptions to make the names more meaningful to you. A primary lookup column with multiple values. ©2009 Microsoft Corporation.
  • 15. A secondary lookup column with multiple values. The column name has been changed from the default name of GetID: Title to Instruments. DELETING ITEMS AND LISTS IN A LIST RELATIONSHIP If you want to delete items or lists in a list relationship, then you need to be aware of the consequences of doing this operation on the source and target lists and any related columns, especially if the lists have an enforced relationship of restrict delete or cascade delete. To maintain the integrity of the data, SharePoint 2010 may block you from deleting items even when you have delete permission. Deleting these items also requires the backend database to temporarily lock the data when performing the delete transaction, which can time to complete. The following sections describe what happens in more detail. Delete a source or target list item with an unenforced relationship When you try to delete a source or target list item that does not have an enforced relationship, then the following occurs: You can remove the item from the source or target list. The related item in the target or source list is not deleted. Delete a source list item with an enforced relationship of restrict delete When you try to delete an item in the source list with an enforced relationship of restrict delete, then the following occurs: You can remove the item from the source list. The related item in the target list is not deleted Delete a target list item with an enforced relationship of restrict delete When you try to delete an item in the target list with an enforced relationship of restrict delete, then the following occurs: You receive an error message that the column is used to enforce the restrict delete operation. You cannot delete the target list item, even if you have delete permission on this item. Delete a source list item with an enforced relationship of cascade delete When you try to delete an item in the source list with an enforced relationship of cascade delete, then the following occurs: You can then delete the item in the source list. The related item in the target list is not deleted. Delete a target list item with an enforced relationship of cascade delete When you try to delete an item in the target list with an enforced relationship of cascade delete, then the following occurs: You can delete the item in the target list and all related items in the source list. ©2009 Microsoft Corporation.
  • 16. The delete operation occurs as a database transaction, which means that the entire delete operation must complete to ensure that neither list is left in an invalid state. NOTE In the case of a Document Library, if the item in the source list is a checked out file, both items are still deleted. Delete a source or target list with an unenforced relationship When you try to delete a source and target list with an unenforced relationship, then you can delete either the source list or the target list, just like any other list. Delete a source or target list with an enforced relationship of cascade or restrict delete When you try to delete a source or target list with an enforced relationship of cascade or restrict delete, the following occurs: You receive a warning that the source or target list has one or more relationships with other lists, and those lists are displayed in the warning message. You cannot delete the source or target list. Restoring from the Recycle Bin If the Recycle Bin is enabled on your site, then all deleted items are stored in the recycle bin, and you can restore them if you need to. If the items were deleted in one database transaction as part of a cascade delete operation, all items in the relationship are displayed, and you can restore them as well. However, the original target and source lists must still exist, or else the items cannot be restored. To summarize: When an item in the target list is deleted, a cascade delete operation also deletes all related items in the source list. When you try to delete an item in the target list, a restrict delete operation will prevent you from deleting the item in the target list if it has one or more related items in the source list. You cannot delete lists participating in an enforced relationship. MANAGING LIST RELATIONSHIPS WHEN LISTS HAVE MANY ITEMS When you create list relationships by using lookup columns, unique columns, and lists with enforced relationships, you can reach a resource threshold or limit and may be blocked under the following circumstances: If you make a column unique in an existing list that has more items than the List View Threshold (but note that adding one item to a list that makes the list greater than the List View Threshold is an operation that is not usually blocked). If you turn on Cascade Delete or Restrict Delete for a lookup field in a list that has more items than the List View Threshold. You have exceeded the List View Lookup Threshold, which by default is eight lookup columns. ©2009 Microsoft Corporation.
  • 17. The number of items in a delete operation exceeds 1,000. USING EDITING PROGRAMS, SUCH AS OFFICE SHAREPOINT DESIGNER 2010 Consider using an editing program compatible with SharePoint 2010. For example, Microsoft Office SharePoint Designer 2010 helps you work with list relationships by providing additional functionality and features. You can connect a List View Web Part or Data Form Web Part to a Related List Web Part to vertically display multiple values from the Lookup target list. You can also restrict insert operations as part of a field validation by using the List Schema editor. Find more information about Office SharePoint Designer 2010 in that product's Help system. How to create a unique and lookup column The following sections provide step-by-step instructions for creating a unique column and a lookup column. CREATE OR MODIFY A UNIQUE COLUMN WARNING You cannot create a unique column in a list with item-level permissions defined, you cannot break inheritance of permissions from a list to a list item if the list contains a unique column, you cannot create a unique column or modify a column to be unique in a list that contains items with unique permissions or one that has content approval enabled, and you cannot copy a file to a library by using the Open with Explorer command, if that library contains a unique column. 1. Navigate to the site containing the list for which you want to add a unique column. 2. Click the name of the list on the Quick Launch, or click Site Actions, click View All Site Content, and then under the list section, click the name of the list. 3. In the ribbon, click the List tab, and then in the Manage Views group, click Create Column. 4. In the Columns Name box, type a name for the column. 5. Under The type of information in this column is, click one of the following: Single line of text Multiple lines of text Choice Number Currency Date and Time Yes/No Lookup (single value) Person or Group (single value) ©2009 Microsoft Corporation.
  • 18. 6. In the Additional Column Settings section, under Enforce unique values click Yes. If you select a data type that is not supported, or of you are creating a lookup column that allows multiple values, the Enforce unique values is not displayed. NOTE A SharePoint site can be significantly modified in appearance and navigation. If you cannot locate an option, such as a command, button, or link, contact your administrator. You cannot remove the index of a unique column. If you want to remove the index, you must change the column from a unique column to one that allows duplicate values first, and then remove the index. If you try to change an existing column from duplicate values to unique values, you may be prevented from doing this operation if the existing column contains duplicate values. In this case, you must remove all the duplicate values first, and then change the column from allowing duplicate values to a unique column. If you want to change the data type of the unique column, you must do the following: change the column to allow duplicate values, remove the index, change the column to the other supported data type, and then make the column unique. CREATE A LOOKUP COLUMN 1. Navigate to the site containing the list for which you want to add a lookup column. 2. Click the name of the list on the Quick Launch, or click Site Actions, click View All Site Content, and then under the list section, click the name of the list. NOTE A SharePoint site can be significantly modified in appearance and navigation. If you cannot locate an option, such as a command, button, or link, contact your administrator. 3. In the ribbon, click the List tab, and then in the Manage Views group, click Create Column. 4. In the Columns Name box, type a name for the column. 5. Under The type of information in this column is, click Lookup. 6. In the Get information from box, select a target list. 7. In the In this column box, select a primary column. 8. Under Add a column to show each of these additional fields, for each secondary column you want to add, click the check box next to the column name. Only columns with supported data types are listed. 9. Later on if you want to add or remove secondary columns, modify the lookup column and make the selections you want. NOTE You cannot index a secondary column nor can you make a secondary column unique. ©2009 Microsoft Corporation.
  • 19. 10. If you want the lookup columns to display in the default view, select Add to default view. 11. To create an enforced relationship, select Enforce relationship behavior and then click Restrict Delete or Cascade Delete. 12. Click OK. ©2009 Microsoft Corporation.