Over the past few weeks while I’ve been covering SharePoint Saturday in New York, attempting to cover SPTechCon in San Francisco (curse you, snowmaggeddon!). Lending an editorial hand to the product launches of BambooRM and Workflow Conductor, several questions from readers have appeared in my inbox. Longtime readers know that means it’s time for another dip into the SharePoint Blank mailbag. Let’s get right to today’s question, which has to do with creating a custom list including a column for a picture:
I am trying to create a custom list. In that list, I would like to have name, description, and picture (basically a bio). How do I go about uploading a picture to that custom list?
This question had the ring of being something that could be accomplished out-of-the-box. It was with no small amount of relish that I ducked into a nearby phone booth, changed into my SharePoint Blank uniform and… wait. Sorry, I got a little sidetracked there. What I meant to say was that I proceeded straight to our portal and commenced setting about seeing if I could accomplish the requested task.
I started by choosing the Create button under the Site Actions dropdown, and then selected the Custom List hyperlink under the Custom Lists heading. Doing so brought up the form to create a new list, which I filled out with a Name of “Profile Test” and entered the question quoted above as a combination description and mission statement:
Create new Custom List in SharePoint
After clicking Create, my Profile Test list was created, empty of any content of course. My next step was to add some custom columns since, by default, the only column on a newly created custom list is the Title column. To add custom columns, I selected the Create Column button under the list’s Settings dropdown.
On the resulting Create Column form, I first selected the radio button for Multiple lines of text, gave it the name of “Bio” and clicked OK to create the new column. I then repeated the process, selecting the radio button for Hyperlink or Picture this time, and giving this second custom column the name “Picture”. With both of my new custom columns in place, the only thing that was left (other than adding some test content) was to change the name of the default column from Title to Name, a name which seemed more fitting for the exercise at hand. To do this, I selected the List Settings button under the list’s Settings dropdown and, on the resulting Customize page, clicked the Title hyperlink under the Columns heading. On the resulting Change Column form (more on this soon), I simply changed the Name of the column from Title to Name, clicked the OK button to make it so, and figured I was off to the races.
At this point it was time to add some test content to my list, so I clicked New Item under the list’s New drop down. Doing so rendered the New Item form for the Profile Test list, and I filled it out with my own profile information for testing purposes, including my name, a one sentence bio with title and responsibilities, and the URL for a picture of myself to include:
Add a new item to a SharePoint list
One important note/disclaimer regarding the picture: the desired picture must have already been uploaded elsewhere, as there is no upload functionality within the list itself. You’re merely providing an HTTP pointer to an already uploaded picture to display within the list. Your picture can exist in a SharePoint picture library but isn’t required to do so; the only requirement is that it be available via HTTP.
At this point, I was all set to celebrate, but what did I see when the list rendered after I clicked OK? The Name and Bio column information appeared as expected but, instead of seeing my picture, I saw the hyperlink to the picture:
SharePoint list with custom column for hyperlink or picture
So it was back navigating the waters of Settings -> List Settings for me. On this trip to the Customize page, instead of clicking the Title hyperlink under the Columns heading. I clicked the Picture hyperlink, and instead of rushing through the creation process as if it were a race (note to self and a hint to others: it’s not). I actually took the time to read the description under the Additional Column Settings heading. And would you look at that! The default option under the “Format URL as” heading is Hyperlink, but the other option in the dropdown is Picture:
Change custom hyperlink or picture column in SharePoint to display picture
Once I’d made and OK‘ed this simple change to my Picture column, satisfaction was mine!
Display a picture in a custom column in a SharePoint list
The only additional note that’s worthy of mentioning here is that, as you may have noticed in the Change Column image above, there is also an option via radio button selection in the Additional Column Settings area to require users to enter information. The default behavior in custom columns regarding such requirements is No, do not make it a requirement that users enter information, so be advised that you’ll need to switch the radio button selection to Yes on your custom columns if you want to ensure that users complete the requested information.