Adding a Choice, Lookup, and Yes/No Columns
Use the Choice, Lookup, and Yes/No column types to structure the information entered in the column. In Chapter 1, I added a Department Choice column to the Phone List. I used the Choice type because I wanted to make sure the entries were consistent – users can only choose from the selections in the list of departments I provided. That avoids misspelled or incorrect department names and allows the Phone List to be grouped by department.
Choice, Lookup, and Yes/No column types have these advantages:
=> Values are consistent so grouping and filtering on these columns is effective.
=> It’s easier to enter values, since choices are provided as drop-down lists or multiplechoice selections.
=> Choices can be shared across lists and sites.
Let’s continue with the Phone List sample a bit more and change the Assistant column from a text column to a lookup. You can’t change the type of a column once it’s created so we’ll have to delete the Assistant column and recreate it with the new type (remember, I told you not to enter data in it!).
Choice, Lookup, and Yes/No column types have these advantages:
=> Values are consistent so grouping and filtering on these columns is effective.
=> It’s easier to enter values, since choices are provided as drop-down lists or multiplechoice selections.
=> Choices can be shared across lists and sites.
Let’s continue with the Phone List sample a bit more and change the Assistant column from a text column to a lookup. You can’t change the type of a column once it’s created so we’ll have to delete the Assistant column and recreate it with the new type (remember, I told you not to enter data in it!).
To change the Assistant column:
1. On the Phone list toolbar, click Settings -> List Settings. SharePoint displays the Customize page.
2. Scroll down and click Assistant in the Columns list. SharePoint displays the Change Column page.
3. Scroll to the end of the page and click Delete. SharePoint warns you that data for this column will be deleted. Click OK to delete the column.
4. On the Change Column page, click Create Column. SharePoint displays the Create Column page.
5. Complete the page as shown in Figure 1 and click OK to create the new Assistant column.
Figure 1: Creating a new Assistant column as a Lookup type
Now, you can fill out the Assistants in the phone list. To do that:
1. On the Phone list toolbar, click Actions -> Edit in Datasheet.
2. Click the Assistant column and then click the down arrow to on the right side of the column to drop-down the list of choices.
3. Click the choice to select the assistant as shown in Figure 2.
Figure 2: Using the lookup column
The Assistant column is a circular lookup. That is, you can choose any name provided the person is already entered in the Phone List. You can use a lookup to pull data from another list in the site by selecting a different source list and column name.
1. On the Phone list toolbar, click Settings -> List Settings. SharePoint displays the Customize page.
2. Scroll down and click Assistant in the Columns list. SharePoint displays the Change Column page.
3. Scroll to the end of the page and click Delete. SharePoint warns you that data for this column will be deleted. Click OK to delete the column.
4. On the Change Column page, click Create Column. SharePoint displays the Create Column page.
5. Complete the page as shown in Figure 1 and click OK to create the new Assistant column.
Figure 1: Creating a new Assistant column as a Lookup type
Now, you can fill out the Assistants in the phone list. To do that:
1. On the Phone list toolbar, click Actions -> Edit in Datasheet.
2. Click the Assistant column and then click the down arrow to on the right side of the column to drop-down the list of choices.
3. Click the choice to select the assistant as shown in Figure 2.
Figure 2: Using the lookup column
The Assistant column is a circular lookup. That is, you can choose any name provided the person is already entered in the Phone List. You can use a lookup to pull data from another list in the site by selecting a different source list and column name.


No comments:
Post a Comment