AnsweredAssumed Answered

set peoplepicker to user other than current user

Question asked by nps9 on Aug 22, 2017
Latest reply on Aug 23, 2017 by nps9

I am trying to set a people picker control to a user other than the current user. I have read the 1222 post and am unable to get that to work: https://community.nintex.com/docs/DOC-1222

I put this function in my custom JavaScript:

function setToPrimay() {

 var ins = new NF.PeoplePickerApi('#' + 'cidRep');
 ins.search('i:0#.w|xxx\userID').done(function (data) {
  ins.add(data[0]);
}

The people picker Client ID JavaScript variable name is: cidRep.

The button has a client click of: NWF.FormFiller.Events.RegisterAfterReady(function () { setToPrimay(); });

(Of course I changed the domain and user ID above)

 

I also tried setting the people picker with no luck: NWF$("#"+cidRep).val('i:0#.w|xxx\userID');

 

Thanks for any assistance,

John

Outcomes