Remove All users from PeoplePicker not working

%3CLINGO-SUB%20id%3D%22lingo-sub-2866776%22%20slang%3D%22en-US%22%3ERemove%20All%20users%20from%20PeoplePicker%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2866776%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20been%20trying%20to%20get%20this%20to%20work%20for%203%20days%20now%20with%20no%20luck.%20P)lease%20help.%20I%20have%202%20people%20pickers%20and%20I%20can%20get%20neither%20to%20remove%20the%20contents%20and%20a%20dropdown%20change!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%2F%2F%2F%2F%2FJQuery%203.4.1%20is%20in%20the%20MasterPage%2F%2F%2F%2F%2F%2F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSCRIPT%20language%3D%22%26quot%3Bjavascript%26quot%3B%22%20type%3D%22%26quot%3Btext%2Fjavascript%26quot%3B%22%20src%3D%22%26quot%3B%2F_layouts%2F15%2Fclientpeoplepicker.js%26quot%3B%22%3E%3C%2FSCRIPT%3E%3C%2FP%3E%3CP%3E%3CSCRIPT%20language%3D%22%26quot%3Bjavascript%26quot%3B%22%20type%3D%22%26quot%3Btext%2Fjavascript%26quot%3B%22%3E%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%24(document).ready(function()%7B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%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26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20alert(peoplePickerDiv)%3B%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BSTRONG%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%2F%2F%20I%20get%20%5Bobject%20Object%5D%20only%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FSTRONG%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20var%20spPeoplePicker%20%3D%20SPClientPeoplePicker.SPClientPeoplePickerDict%5BpeoplePickerDiv.%5B0%5D.id%5D%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20if(spPeoplePicker)%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3B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gt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%3C%2FSCRIPT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I have been trying to get this to work for 3 days now with no luck. P)lease help. I have 2 people pickers and I can get neither to remove the contents and a dropdown change!

 

/////JQuery 3.4.1 is in the MasterPage//////

<script language="javascript" type="text/javascript" src="/_layouts/15/clientpeoplepicker.js"></script>

<script language="javascript" type="text/javascript">

 

$(document).ready(function(){

       $("select[[Title='Fiscal Year'].change(function()

        {

              PeoplePickerFieldValue("Division Manager")

        }

}

 

function PeoplePickerFieldValue(position)

var DivisionMgr = position;

 

setTimeout(function()

  {

    var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + DivisionMgr + "']");

    alert(peoplePickerDiv); // I get [object Object] only

    var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv.[0].id];

 

    if(spPeoplePicker)

      {

        var ResolvedUsersList).each(function(index)

         {

             spPeoplePicker.deleteProcessedUser(this);

         });

    }

  }, 1000);

}

 

0 Replies