Thursday, August 20, 2009

Creating Custom lists in Windows Sharepoint Services 3.0

Custom lists are easy to create in Windows Sharepoint Services 3.0 and then they can be used with Workflows, custom columns, lookup columns and calculated fields. Although there are already existing lists provided by Sharepoint but, using custom lists gives you more options to work with your data.

Step 1: If you have an excel sheet full of data, it is important to remember not to put it all in one list. Break up your data into different lists simply on the basis of different entities. Like Product into one, Order into the other etc.

e.g.

Company

Product

Employee

EmpID

Price

Qty

Total

ABC Ltd

Bicycle

Arun

E123

Rs. 125

3

Rs. 375

BCD Ltd

Toy Gun

Anil

E456

Rs. 75

2

Rs. 150

Step 2: Here we are assuming you already have a blank site to work with. First we will create the Products custom list.

Select Site Actions - Create




Step 3: On the Create screen select ‘Custom List’ from the ‘Custom Lists’ section.





Step 4: On the New screen type ‘Products’ in the ‘Name’ field and type a relevant description in the ‘Description’, then click on create button.

Step 5: We will now have an empty list called ‘Products’. This is a simple empty list without any columns. We will simply use the same columns as in the spreadsheet.

Now, we have to remember that everything is Sharepoint is based on Content Type. It is difficult for someone who has been working on SQL to get used to this idea of Content Types. By default our new Custom List is based on Item Content Type, so it already has a default column – ‘Title’

Step 6: We can even change the name of the column Title.

-> Select Settings - List Settings

-> In the ‘Columns’ section click on the ‘Title’ button.

-> On the ‘Change Column’ screen, in the ‘Column Name’ field type ‘Product Name’.

-> Click on the ‘OK’ button.

-> When you click on the Products list now, you will notice that the heading has now changed to ‘Product Name’.

Step 7: The next step is to add another column to our custom list.

-> Select Settings - Create Column

-> In the Column name fields type ‘Price’.

-> In the type of information field select ‘Currency’.

-> In the Currency format field select an appropriate currency.

-> Click the ‘OK’ button.

We will now have another column named – Price.

We can use the same steps for creating new columns or changing existing columns.

Step 8: The next step is to add data to our custom list i.e. to create a new list item

-> Click the New button.

-> Type the product name in the respective column

-> Type the price for the product in the respective column.

-> Click the OK button.

You will have the below data in your list:

Product Name

Price

Bicycle

Rs. 125

Toy Gun

Rs. 75

Step 9: Follow the same steps to create the ‘Customers’ list.

The ‘Customers’ list can have the below columns:

Last Name

First Name

Company

EmpID

Gupta

Arun

ABC Ltd

E123

Jain

Anil

BCD Ltd

E456

You can get these columns by following Steps 5,6,7 and 8.

Step 10: We can also create custom lists with lookup columns to other lists. Let us create a list ‘Orders’ with lookup columns for Customer and Product created above.

-> First create a ‘Product’ list following the steps 5, 6, 7 and 8.

The columns in the list would be as follows:

Quantity

Total

3

Rs. 375

2

Rs. 150

Now, we need to add the respective lookup columns. To create the customer column we will follow the below steps:

-> Select Settings – Create Column

-> In the ‘Column Name’ field type ‘Customer’.

-> In the ‘Type of information’ field select ‘Lookup’.

-> In the ‘Get Information from’ field, select Customers from the drop down list.

-> In the ‘In this column’ field, select ‘Full Name’ from the drop down list.

-> We can repeat the same steps for a column named ‘Products’ and a lookup to the Products list.

So, finally our Orders list would look something like:

Quantity

Total

Customer

Products

3

Rs. 375

Arun Gupta

Bicycle

2

Rs. 150

Anil Jain

Toy Gun

So, in Sharepoint, you can easily normalize your data by dividing it into lists. You can also link different lists using lookup columns.