You may also be interested in: O'Reilly - SharePoint 2010 at Work
Editor's note: Follow contributor Ryan Elliott @ryanelliott82
In response to a comment left to me on the page for Filtering with Web Part Connections, Kerri Abraham asked me to do a how-to on an alphabetical search of a list. The below process will guide an end user from start to finish, Creating a Contacts list, the needed views for the alphabetical search to function, and creating the custom list to do the alphabetical search.
- Create a custom list and give it whatever columns you will need to keep track of…
- Fname Single line of text
- Lname Single line of text
- Title Single line of text
- Facility Single line of text
- Address Single line of text
- City Single line of text
- State Single line of text
- Zip Single line of text
- Phone Single line of text
- Fax Single line of text
- Approval Status (you don’t need this unless your list items need to be approved before going live
Now that you have your contact list created, you can create a view for your alpha search based on last name
Now, create another custom list to enable the alphabet shortcuts (in our case, we called this list AlphaSearch)
- Click on the drop down selection for View:
- Next, click on Create View
- And then select Standard View and give it the name A
- Make sure the columns listed in step 1 are selected to be part of the view (or whatever columns you want visible on the default page).
- Set your Filter for the view to be as follows…
- Click OK to create the view
- Repeat this process for each of the other 25 letters of the alphabet
- You can leave the mandatory field Title in place, and change the default view to not display this column
- Next, create 25 more columns for each of the remaining letters
- A Hyperlink or Picture
- B Hyperlink or Picture
- C Hyperlink or Picture
- D Hyperlink or Picture
- Be sure to change the Format URL as: field for each column to be a Hyperlink
Once you list has been created, go back the AllItems.aspx page so that all columns are visible
Next, click on New to add new items to the AlphaSearch list.
- You can leave the Title field blank, and make the description match the column name
- In the web address field – place the link to the specific view you created in Step 2 for each letter of the alphabet
- Click OK to save you additions
Once complete, the AlphaSearch list will be setup to search your Contacts list, where the last name starts with the corresponding letter of the alphabet.
You can take this one step further if you would like, and add the AlphaSearch list as a webpart to your contacts list.
- Open the Contacts list, and click Site Actions, and then Edit Page.
- Add the AlphaSearch web part above the contacts list, and click Exit Edit Mode to save the addition.