Forum Discussion

amke321's avatar
amke321
Copper Contributor
Sep 13, 2023

Choice field with Intellisense / Autocomplete not working perfectly

I have a SP list "choice" column with "Allow Fill-in choices: Yes". It lets add new choice texts while filling Form. But when typing an already (previous) added choice. The intellisence / autocomplete only works when the initial letter / word is typed. For example:

 

 

The option 'My Cup Of Tea' only shows when I type the starting word 'My' and not when 'Cup' or 'Tea' is typed.

 

 

I have users working with list item count > 3000 and it's critical that the suggestions work for the choice column. Is there any work around through JSON or any other List setting which can enable user to have improved suggestions in the Choice field?
Sara_Cummings SergeiBaklan traceycarisch GabeHo Brady-B HansVogelaar Deleted The_Exchange_Team  NikolinoDE GBushey Karl-WE VasilMichev ganeshsanap Riny_van_Eekelen PeterBartholomew1 NicolasKheirallah Patrick2788 AMateos91 deepaksharma1984 

  • amke321 This is by design in SharePoint and default behavior of search option for choice column options.

     

    Search works based on "starts with" criteria and not "contains" criteria. I don't think there is any setting to change this behavior and you cannot modify this behavior of list forms using SharePoint JSON formatting.

     

    If you want Microsoft to change this behavior, you can submit feedback at: SharePoint Feedback Portal 


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

    • amke321's avatar
      amke321
      Copper Contributor
      ganeshsanap What's the work around bro? The employer just told me 'nothing is impossible' =))

      Should I make the shift to PowerApps?
      • amke321

        It is not possible using SharePoint default functionalities as well as SharePoint JSON formatting capabilities.

         

        If this feature is absolutely required by your employer then you will have to customize the list form using either Power Apps (easy & low code) or SharePoint Framework (coding experience required).

         

        I will suggest you to inform your employer that form UI will change if you customize the list form using Power Apps before actually making changes to list form and let them decide they are fine with UI changes.


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    amke321 

    Improving the autocomplete or intellisense functionality in a SharePoint Choice field for multi-word choices can be challenging due to SharePoint's default behavior. However, here is a concrete solution proposal that you can implement:

    Use a Managed Metadata Column:

    Managed Metadata columns provide a more flexible and structured way to manage choices, and they offer a richer tagging experience. Here is how you can use this approach:

    1. Create a Managed Metadata Term Set:
      • Go to your SharePoint site.
      • Click on "Settings" (gear icon) and select "Site settings."
      • Under the "Site Administration" section, click on "Term store management."
    2. In the Term Store Management Tool, create a new term set that corresponds to your choice field.
    3. Add terms to the term set, using single words or short phrases as individual terms. For example:
      • Term: My
      • Term: Cup
      • Term: Tea
    4. In your SharePoint list or library, create a new Managed Metadata column and associate it with the term set you created.
    5. Replace your existing Choice column with the new Managed Metadata column in your list's content type or forms.

    Benefits of using Managed Metadata:

    • Terms are hierarchical, allowing you to organize choices in a more structured manner.
    • Terms can have synonyms, so if a user types "Tea," it will suggest "Tea" even if the term is associated with "Cup of Tea."
    • SharePoint's built-in autocomplete behavior works more effectively with Managed Metadata columns compared to Choice columns with multi-word choices.

    Please note that implementing this solution may require some initial setup time to migrate your data and configure the Managed Metadata column. However, it should provide a better user experience with improved autocomplete suggestions for multi-word choices.

    Remember to communicate the change to your users and provide training if necessary, so they are aware of the new column and how to use it effectively.

     

    Additonal you can try with Custom JavaScript Solution. You can create a custom JavaScript solution to enhance the autocomplete functionality. This solution would involve overriding the default behavior of the choice field. It can be complex, but it gives you full control over the autocomplete behavior. Here is a simplified example to get you started (untested):

    Javascript code:

    // Add this script to your SharePoint form $(document).ready(function () { // Target your choice field by its ID var choiceField = $("select[id$='YourChoiceFieldID']"); // Enable autocomplete for the choice field choiceField.select2({ tags: true, // Allow custom entries tokenSeparators: [',', ' '] // Define token separators }); });

    This code uses the Select2 library for improved dropdowns with search capabilities.

     

    As a long-term solution, consider cleaning up the existing data in your choice column. Remove duplicate or similar choices to make it easier for users to find what they need.

     

    My knowledge of this topic is limited, I entered your question in various AI. The text and the steps are the result of various AI's put together.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

      • ganeshsanap's avatar
        ganeshsanap
        MVP

        AMateos91 SergeiBaklan

         

        Please ignore responses by NikolinoDE. Most of the times those are AI generated responses which are not tested in SharePoint and does not work!


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

  • fuhlig's avatar
    fuhlig
    Copper Contributor
    When using a "choices" field in list view, only the start of the text matches.
    When opening the element in a dialog and using the choices field, it matches any containing text not only the start.

    So the functionality is there but not consistent within all views.

Resources