Set up SharePoint List to Auto-Populate User Information (Screencast)
Author: Laura Rogers, Birmingham, AL
SharePoint 911
When users frequently fill out forms, they get tired of typing that same old information, like the name of their department and basic information about themselves. Here’s a way that you can use out-of-box functionality in MOSS Enterprise, to create a custom form with fields that are automatically populated based on profile information about the current logged in user. Laura Rogers has written this blog post SharePoint List Form – Default User Information describing the steps of the process, along with the following seven minute screencast.
Author: Laura Rogers, Birmingham, AL
SharePoint 911
I’m going to be rude and post the link to my alternative method on my blog for this using jQuery: Populating a SharePoint List Form with the Current User Information. I think in some cases, it’ll be a bit easier to implement.
M.
Laura really had me going until I hit the wall of SP Standard Edition which does not have the Current User Filter. So off to Marc’s solution. As a test, thinking I could pair the little bit of sample JQuery code in a CEWP with a simple custom list (department, workphone) then quickly realized I didn’t know what to do with it from there. Do I place it on the list page, do I point to jquery.SPServices-0.5.4.js or jquery-1.4.2.min.js
My desire is: when filling out a form to auto-populate my Manager’s preferred name and department. Is there a simple bulleted list of what needs to be done to get me started, or do I need to read the whole book? Does / will one of the EUSP On-Line Workshops cover this sort of subject?
David:
I can help you figure this out. Let’s move the discussion either to the jQuery Library for SharePoint Web Services Solutions Forum on Stump the Panel here at EUSP or over to the Discussions on the Codeplex site so that we can easily trade code.
If you can give me more details on what you are trying to do, we’ll see if we can’t solve it.
M.
Laura,
Double thanks! First for your post then for the shout out about Lori Gowin’s Blog Post!! Below is an excerpt from one of SharePoint Admins.
“I can’t explain to you how excited we are that you found that article. We are like kids at Christmas time that just got a new toy. This is going to make our lives so much easier when building forms in the future.”
Thanks for making the SP Community a better place!
Dave Winters
BTW, here is the link to Lori’s post:
http://www.pointgowin.com/SeeThePoint/Lists/Posts/Post.aspx?ID=3
Hi, Laura,
I just ran across your very nifty solution for autopopulating fields from current user logged in. However, in my case, I don’t want to autopopulate fields related to current user logged in, but instead, I’d like to autopopulate fields based on how one of the other fields data gets entered. For example; I have a standard calendar list form with some added fields for (Make and Model) (license number) (VIN number) . Once I enter the Make and Model, the license number and VIN number fields get populated for that vehicle. Where it gets that information, I suppose, is to create another list for automobiles with that information in it.
I need the calendar functionality for this list in order to link it to Outlook to take advantage of its alert functions, which work very nicely. I just need to get the car info autopopulated there so it won’t have to be typed in every time a car is selected.
Is there a nefty way to do this?
Tom:
You could use jQuery and my my SPServices library for this. What you would do is to add a change event to the make/model columns, look up the corresponding license/VIN information with GetListItems, and then populate the column values in the form.
M.
Thanks, Marc
However, I don’t know how to write jquery from scratch like you do. I do know a little about getting around in SP Designer, though.
Still, I will try to teach myself how to use jQuery and your SPServices library. In the meantime, there should be a way to use SPD.
Tom:
I’ll be wowed if you or Laura can come up with a way to do what you describe without writing some scripts, or at the very least, doing a postback to the server in a DVWP.
If you decide to try out SPServices, I’m there to help in the Codeplex Discussions.
M.
I’ll second that. If you know Javascript you can use jQuery. And Marc’s library is an absolute godsend. Feel free to email me any questions you have and I’d be happy to help you out and we can post the solution on EUSP. Once you get the hang of it all it’s so simple – Marc has done all the work! Although defending it has probably been twice the work :) But that makes for the interesting reading.
Tom,
Do you have MOSS? The BDC has that kind of functionality. So, your second list could exist as another data source and when you add a new column in the main list as the type BDC, then it lets you pick a field and pick all the other associated fields to get pulled in.
OR
You could just wait for SharePoint 2010 because that’s all built in to regular lists. ;-)
Hi, Laura,
Yes, I have MOSS. I’ll look at that functionality right away. We don’t use the BDC yet, so I’m not up on it.
I’ll reply to this thread once I take a look at it.
Thanks, again, Laura. I’ve used several of your tutorials that got me out of a couple of jams already.
Tom,
You can use BDC Metaman to set up that application definition file that needs to be uploaded in Central Admin:
http://www.lightningtools.com/bdc-meta-man/default.aspx
Laura,
I looked at the video and that looks very good.
My explaination of what I was hoping to do may not have been accurate.
When I make a new entry in the list using the NEW lable on the list bar, the form opens. The Make and Model field is a drop down field, for example. If I select vehicle 1, then the VIN field, License field get poplulated with that vehicles info. Then, I enter the start date and end date and say OK, and the form closes and Vehicle 1 is now in the list. For each vehicle I do this.
That’s what I’d like to achieve.
Is that duable using the BCD? From what little reading I’ve done so far, it does not appear it can do that. I’ll just have to read more to be sure.
hi Laura,
ur article helped me much!!
but im stucked in 1 thing..
if i introduce column in my User Information List and i want to auto populate this column,,
how i can do tht..
Kindly reply..
thnks
Saghir A. Khatri
Hello Laura,
Just wanted to thank you for this and let you know that you ROCK!!
Regards,
-Alex
A good way is not to copy the data into the list manually or by code, but have sharepoint do all sync work for you.
By using projected fields a lot of the problems go away.
http://djeeg.blogspot.com/2010/07/projected-fields-with-user-profile.html
If I have a list with Projects, and every week I want to update my own project with our the necessety to write everything again, how do I do it.
If a project has a unique identifier (a number) every time I create an update I want to be able to select that unique number and all information will be populated and I will just update what is necessary.
Is that possible?
Laura has a great way of doing that with content types. Watch this screencast:
http://www.endusersharepoint.com/2010/02/05/sharepoint-making-the-most-of-content-types-screencast/
Will this method work for auto populating fields from other list in the site?
http://www.c-sharpcorner.com/uploadfile/ssahmed/spslistcol09182006055026am/spslistcol.aspx
chk this nedra
hope it will help
Saghir A. Khatri
Saghri, I would like several columns from the lookup column to appear in the list.
plz Post ur Furthur Questions to some discussion forum…
u have to do this for every column as it is in mentioned URL
Hi Laura,
Very interesting video. I am working on auto populating user’s name and supervisor name in our vacation calendar. I have WSS and not MOSS. Is there a way to do that in SP 2007?
Thanks,
Nikkie
Nikkie:
Odds are you don’t have the user’s supervisor stored anywhere in WSS unless you’ve created a list to contain the data. Take a look at my SPServices library to capture the current user and see my blog post here about it.
M.
Marc,
Thanks for your response.
I have never written jQuery before. I used OOTB service most of the time. I can definitely create a supervisor list. Can you please explain how I can use jQuery for auto populating?
Nikkie
I am trying to auto populate the user information without changing the “List Form Field” to “TextBox ”
It’s actually people or Groups field where i want to autopopulate
Is it possible to auto populate without changing the “List Form Field” to “TextBox “, if yes where i need to give the Parameter Name
Thanks in advance
Hi Laura,
First of all Thanks a Ton. This saved me a lot of time. I tried using these on three fields but unfortunately only User Name Field is being stored in the list after clicking on OK button. Do you know any reason as why will this happen
Got it. My bad did a small mistake and got it rectified.