I have two lists:

Customers Customers_Documents

The customer list is large -> >10.000 items. When i bind the customer via a lookup field to the Customer_Documents list in general it works, but it is not very user friendly cause of the large amount of items.

Is there a way to use something like SELECT2 or similar to filter/search for items within lookup column?

I need a way without programming, cause i am only able to use OOTB functions like JS, SPDesigner, WebParts etc.

  • Using OOTB functions, you're out of luck. Sorry.
    – Nils
    Oct 2, 2016 at 11:47
  • Hm, no luck with SPDesigner, Script Parts, etc.?
    – BOG
    Oct 2, 2016 at 11:59
  • Sure, you could inject some JavaScript (using JSLink, content editor WebPart or SPDesigner) and modify the visualization of the lookup. It wouln't be OOTB, though.
    – Nils
    Oct 2, 2016 at 12:54
  • Ah ok, but if this is possible that would be fine for me. But is this possible? I would also update my question.
    – BOG
    Oct 2, 2016 at 12:56

1 Answer 1

    $(document).ready(function () {
            ajax: {
                url: function(params){
                    return "**yourSharepointSiteAddres**/_api/web/lists/GetByTitle('**yourLookupList**')/items?$filter=substringof('"+params.term+"',**yourLookfielYouWantFilter**)";
                ,processResults: function (data) {
                    var f='{"results": ['
                    data.value.forEach(function(ele) {
                        var $f="";
                        if(counter==0)$f="";else $f=",";

                    }, this);
                    return f;
                }/// End processResults
            }/// End Ajax request
        });/// End select 2 function
    });//// End Document ready function

Remove all ** from your code

you can visit this link


Your Answer

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

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