AnsweredAssumed Answered

Unable to get PeoplePickerAPI to work

Question asked by jeff_l on Dec 7, 2018

I am trying to clear a people picker field (Requester) in a form if another selection is made on a choice field.

 

I've read the other links on using the PeoplePickerAPI and here is my js.

 

NWF.FormFiller.Events.RegisterAfterReady(function () {
   NWF$("#"+varJSRequestType).change(function () {
      clearRequester();
   });
});

 

function clearRequester() {
   if (NWF$("#"+varJSRequestType).val()=="Process OT") {
      alert('Here I am');
      var varPeoplePicker = new NF.PeoplePickerApi('#' + varJSRequester);
      alert('Here I am');
      varPeoplePicker.clear();
      alert('Here I am');
   }
}

 

The code runs fine and I get the first alert, but it seems to fail on defining the varPeoplePicker variable.  It just jumps out of the code.  No errors, but I never get the 2nd or 3rd alerts.

 

Here is the varJSRequester definition on the people picker.

 

 

Is the PeoplePickerAPI not available for Nintex for Office 365 or is it just not available on our system?  Any way to check that or any other thoughts?

Outcomes