Setting People Picker With Name Of Logged In User

Nov 23, 2012 at 2:57 PM

Hi Marc,

Thanks for your work on this. I am new to this. I am having an issue with setting the people picker to the name of ther user that is logged in. If you could let me know what I am doing wrong I would apreciate it. I have included the code below. There are some test alert functions in it that all work. The people picker is the only item not working

Thanks for your help.


<script type="text/javascript">
  //alert ("js on.");
  $(document).ready(function() {
   alert ($().SPServices.SPGetCurrentUser());  This Works
   var thisSite = $().SPServices.SPGetCurrentSite();
   alert ('Hello World! Your site is : ' + thisSite );  This Works

   siteContactPeoplePicker = $().findPeoplePicker({
    peoplePickerDisplayName: "Member",
     valueToSet: $().SPServices.SPGetCurrentUser()


Nov 23, 2012 at 5:40 PM

Should mention I am using SP2010 with JQuery 1.8.3 and SPServices 0.7.2. The People Pickers Displan Name is Member


Nov 23, 2012 at 5:50 PM


I can't spot anything. Just for kicks, try setting the value to a fixed string, like in the documentation. Otherwise, I think you'll have to debug a bit.


Nov 23, 2012 at 6:06 PM

Setting the string didn't work. I ran it in the console here is what I got back

SCRIPT438: Object doesn't support property or method 'findPeoplePicker'

NewForm.aspx?RootFolder=%2FLists%2FMembers Time&IsDlg=1, line 736 character 4


Nov 23, 2012 at 6:56 PM

OK I found the issue. In the Source the function is SPFindPeoplePicker not findPeoplePicker. I am now geting data in the peoplepicker

Nov 24, 2012 at 5:00 PM

It's the litle things. Sorry I didn't spot that when I looked.


Nov 24, 2012 at 5:02 PM
Figured it was something like that. Thanks for your help and your time putting this code out there.


Sent from my iPhone

On 2012-11-24, at 1:00 PM, "sympmarc" <<>> wrote:

From: sympmarc

It's the litle things. Sorry I didn't spot that when I looked.


Read the full discussion online<>.

To add a post to this discussion, reply to this email ([email removed]<mailto:[email removed]?subject=[SPServices:404372]>)

To start a new discussion for this project, email [email removed]<mailto:[email removed]>

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe<> on<>.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at<>

Jan 15, 2013 at 1:02 PM

Marc, first of all, thanks for your great work with SPServices!!

Just wanted to inform you that I also spent some time investigating why SPFindPeoplePicker function didn't want to work for me. Then I discovered that the cause was exactly the same as described by chrisrwebb. The reason for that is that we copied the example from the $().SPServices.SPFindPeoplePicker documentation page. The syntax on that page is ok, but the example code is:

var salesRep = $().findPeoplePicker({
peoplePickerDisplayName: "Sales Rep",
valueToSet: "APPTIX\\emullerbeck53"

which of course doesn't work. Just wanted to inform you so you might correct the example in order to make it easier (read: working in the first try) for other "lazy" people like me who just copy the example... :)



var salesRep = $().findPeoplePicker({
peoplePickerDisplayName: "Sales Rep",
valueToSet: "APPTIX\\emullerbeck53"
Jan 15, 2013 at 1:33 PM


Oh, that's bad. I'm really sorry about that. I didn't realize that I had done it, but now it's fixed.


Jan 16, 2013 at 5:56 AM

Marc, don't be sorry about that, you're saving us already lots of time and trouble with your SPServices, thanks!


Jan 31, 2013 at 4:40 PM
I have the correct syntax and it still throws the error.
var assigned = $().SPFindPeoplePicker({ peoplePickerDisplayName: "Employee"});