Forum Discussion
Choice field with Intellisense / Autocomplete not working perfectly
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:
- 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."
- In the Term Store Management Tool, create a new term set that corresponds to your choice field.
- Add terms to the term set, using single words or short phrases as individual terms. For example:
- Term: My
- Term: Cup
- Term: Tea
- In your SharePoint list or library, create a new Managed Metadata column and associate it with the term set you created.
- 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.
- ganeshsanapSep 14, 2023MVP
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.
- NikolinoDESep 14, 2023Platinum Contributor
I cannot understand why some people are so disturbed by AI's suggestions.
I mentioned clearly enough that my suggestion was suggested by an AI and is untested, as well as my limited knowledge of the topic.
The fact that some people only rely on human knowledge and cannot get used to AI is, in my opinion, a step back into the past.
The fact that messages are now being warned that messages should be ignored is, to put it mildly, a source of incomprehension for me.
Let us let the user decide what is useful for them or not.
“The ability to observe without judgment is the highest form of intelligence.” (Jiddu Krishnamurti)
- ganeshsanapSep 14, 2023MVP
We don't have any issues with the AI generated answers if those works correctly.
It is a problem when those answers are incorrect and not verified. Mainly when OP tries to follow the steps given in incorrect AI generated response and they get stuck in between those steps - it wastes lot of time of users trying to find out why the solution is not working.
In this particular response, you are suggesting to use the custom JavaScript on list forms but SharePoint online does not support using custom JavaScript directly on list forms like SharePoint server versions (via script editor or content editor web parts).
I can give another example, like here: SharePoint Online Query Rules - You are suggesting to use the PowerShell command like Get-SPOSearchQueryRules and New-PnPSearchQueryRule which is misleading as these commands are not available in SharePoint Online PowerShell and PnP PowerShell. And I am sure OP susheel020 must have wasted his precious work time trying to find out these commands on the internet.
This are just few examples. You can guess what will happen when AI generated responses suggest deleting columns or data in their steps to solve some issue and user tries to follow such steps thinking it will solve their issue but they will lost the whole data from SharePoint lists.
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.