Forum Discussion

Sadok_Hadji's avatar
Sadok_Hadji
Copper Contributor
Jun 01, 2020

SharePoint Online Lookup Dropdown Autocomplete/Combobox

Hi All,

 

I have a list in Sharepoint Online, which has a lookup to an other list. No matter what, on the form it will always render as a dropdown value. When this list of values becomes huge, it's hard to find the correct item in the dropdown.

Therefore I want to implement something like this: http://jqueryui.com/autocomplete/#combobox

This will allow to type in the lookup field and find the correct item easily. Is this possible and how can I implement this?

 

Kind regards,

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    Sadok_Hadji I'd use Power Apps where you can have a text box where you start entering  a name and the gallery gets filtered as you type. That's what I did in my ISO Airports Database app which has many thousands of items in a SharePoint list; you start typing the name of the country and the gallery gets filtered automatically with airports in the country with those starting letters. In my app you can also start typing the name of an airprt and the same thing happens.

     

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User

    • FabioCartolano's avatar
      FabioCartolano
      Copper Contributor
      Hi RobElliott, may I ask you some suggestions on how to realise a Power pp like yours? I'm quite new to Sharepoint and would like to make something similar, is there a tutorial maybe?
      Thanks,
      Fabio
      • RobElliott's avatar
        RobElliott
        Silver Contributor

        FabioCartolano the best way you can learn Power Apps is to follow the videos on YouTube by Shane Young.  He's a really great teacher and very easy to understand. That's what I did - and still do! - and they've helped me to build some really good apps.

         

        Rob
        Los Gallardos
        Microsoft Power Automate Community Super User

  • Hi Sadok_Hadji,

     

    It's definitely possible using SPFx. You can create a custom dropdown - maybe even that one using jQuery - querying data from your list and then filtering them as the user types a value. If you want your control to be available in the "New" or "Edit" Form, when you create or edit an item through SharePoint, I think you'd have to use PowerApps.

  • Lewis-H's avatar
    Lewis-H
    Iron Contributor
    This cannot be done without code. If you can only use native InfoPath, there is no type-ahead functionality for combo-box or drop-downs.

    If this is a list form, you will not be able to use code behind at all. You may get some traction with a JavaScript approach. Start with this blog post that explains the process using Marc Anderson's SPServices on the web page where the form displays:

    http://butdoesitwork.typepad.com/but_does_it_work/2011/08/infopath-and-autocomplete-and-other-lessons.html
    • RobElliott's avatar
      RobElliott
      Silver Contributor

      Lewis-H as the original poster is using Sharepoint Online I assume (though I might be wrong) that he has access to Power Apps which has replaced InfoPath - you can't use Infopath on a modern SharePoint Online site in Office 365. Hence my suggestion to use Power Apps where what s/he wants to do can be done quite easily.

       

      Rob
      Los Gallardos
      Microsoft Power Automate Community Super User

Resources