Problems with names not being recognized for autocomplete

Forums Autocomplete Problems with names not being recognized for autocomplete

Viewing 3 reply threads
  • Author
    Posts
    • #7196
      Nicole Foster
      Participant

      I have the autocomplete JS set up for a people picker field called Student Name and it auto populates Student Email, which is also a people picker field. It is set up through our AD database.

      Occasionally, there is a student who doesn’t show up in the Student Name autocomplete function, but does show up in the people picker field in Student Email. With the code, we need a way to manually enter names, and store them in the list. Or I would like a way to access the original people picker function if autocomplete can’t find a name.

      Currently, if you enter a name that is not found in the system and the field is not required, it won’t save the text and the field will be blank once saved into the list.

      Any idea on how I can find a solution for this?

      Here is my code:

      
      
      	<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
      	<script type="text/javascript" src="https://sharepoint.syr.edu/dsa/organization/icc/orl/package-tracker/SiteAssets/spjs-autocomplete.js"></script>
      	<script type="text/javascript" src="https://sharepoint.syr.edu/dsa/organization/icc/orl/package-tracker/SiteAssets/spsjs-utility.js"></script>
      	<script type="text/javascript">
      	//intialize fields
      	fields = init_fields_v2();
      		
      	//Autocomplete email column from name column
      	spjs.ac.peoplePicker({
      	"applyTo":"Student_x0020_Name",
      	"forceOn2013":false,
      	"helpText":"Enter student's name...",
      	"showField":"Title",
      	"chooseFromUserGroup":null,
      	"showUsersOnly":true,
      	"rowLimit":5,
      	"listOptionsOnFocus":false,
      	"reValidateOnLoad":false,
      	"setFields":[
      		{
      			"fromFIN":"EMail",
      			"toFIN":"Student_x0020_Email",
      			"skipIfEmpty":false
      		}
      	]
      });	
      	</script>
    • #7198
      Alexander Bautz
      Keymaster

      Hi,
      The autocomplete reads the users from the user list in the site collection. My best bet for why the user does not appear is that the user have not yet signed in to the site (all users must sign in one time before they are written to the user list).

      Could this be the issue?

      I could add a “kill” switch to the autocomplete, but I cannot use it to add people to the user list in SharePoint.

      Alexander

    • #7199
      Nicole Foster
      Participant

      Hi Alexander,

      Thank you for that information.

      In our case, there are several users who do not appear in the list because they are students so they have not and most likely will not log into our Sharepoint environment unlike our users who are staff members. I just need a way for manually entered student names to be stored in the list because currently if I manually type in a user that is not found by the autocomplete system, it will show the student name as blank once saved into the list.

      Any advice on how to do this with the code?

      Thanks,
      Nicole

    • #7201
      Alexander Bautz
      Keymaster

      Sorry, but this is not possible with the autocomplete solution, so I’m afraid you will have to go with the stock people picker field for this one.

      Alexander

Viewing 3 reply threads
  • You must be logged in to reply to this topic.