1

My lookup list contains thousands of items and it is time consuming to search for the right item.

Is it possible to create a search field in the new item form to help and find the right item?

6
  • are you able to programm such a field in c#? if yes, then it is possible ;)
    – Gwny
    Commented Sep 29, 2016 at 11:08
  • @Gwny I would be able, but how can I add it to my new item form?
    – uko
    Commented Sep 29, 2016 at 11:11
  • how many lists would need this field in their newform?
    – Gwny
    Commented Sep 29, 2016 at 11:11
  • @Gwny the lookup data is coming only from 1 list, if that is what you mean
    – uko
    Commented Sep 29, 2016 at 11:14
  • @Gwny only 1 list would use it
    – uko
    Commented Sep 29, 2016 at 11:15

1 Answer 1

1

I have achieved this functionality using one JQuery API Select2.

please refer some of the links to use Select2 with SharePoint like how-to-add-select2-jquery-to-lookup-in-sharepoint-using-add-web-partscript-edit and using-select2-and-sharepoint-2013-rest-api-with-large-lists-and-infinite-scroll and many more if you search little bit on net..

Edit 1:

As per suggested comments given, I am now elaborating my answer..

Edit your new or edit form, then add one Script Editor Web Part, edit that web part and give reference of select2 js file and css file like this

 <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" />
 <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>

Then apply select2 using below script :

 <script type="text/javascript">
 $('[id^="ColumnInternalName"]').select2();
 </script>
3
  • 1
    Please don’t add just a link as answer to a question. If the link breaks, the answer you provided will not be useful for future visitors. Provide an answer of your own and use the link as reference. If needed, you can block quote the content from your link. More information is found in our help center, especially How do I write a good answer
    – Benny Skogberg
    Commented Sep 29, 2016 at 12:44
  • 1
    Thanks for comment.. Elaborated answer as per your comments..
    – SID
    Commented Oct 3, 2016 at 6:51
  • 1
    +1 You've provided a very good answer. Thanks for the update!
    – Benny Skogberg
    Commented Oct 3, 2016 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.