AnsweredAssumed Answered

People Picker

Question asked by virtualeffect on Jan 28, 2015
Latest reply on Feb 3, 2015 by virtualeffect

I'm trying to set a specific people picker to the current user.  I'm using this in Sharepoint 2010.  When I click on the help/about in the Nintex from, it says :


Nintex Forms 2010

© 2015 Nintex. All rights reserved.



So I have some jquery working.  And I added spservices and the version that includes the NWF aleady.

Here's what in the form's advances setting for Jquery:



I'm not sure if what I'm testing only works with never versions of Nintex.  I have the scripts in the Settings/Advanced section.  And In the Requestor column, I have it set to save the client ID in the variable defaultrequestor


//Get the current user name
var user= NWF$().SPServices.SPGetCurrentUser();


// Set People picker based on columns Advanced - Client ID JavaScript variable name
var requestorpicker = NWF$("#"+ defaultrequestor);


//Find the Specific People picker field "Requestor" and set its value


peoplePickerDisplayName: requestorpicker,

valueToSet: user,

checkNames: true



I can't even get it to find the value of the column on a form already filled out.


var requestorpicker = NWF$("#"+ defaultrequestor);

var pickval = requestorpicker.val();

alert (pickval);


I've tried some variations here.. like this from another post:


var display = NWF$("#"+TeamValue); 




I tried .val and .text, and at one point.html and a few others..


The .text comes up empty, even on a form where there is data.


On a form alreday filled out it, the alert says 'Undefined'.  And on a new form it alerts with no text.


Is there a different approach I need to take?


when this didn't work I went on several tangents to try other stuff..