In 11.0 SP11, type-ahead was introduced to List and Item fields to make editing forms easier and more convenient for Users. When a user types in one of these fields, a dynamic list of options will be shown based on what the user has typed in to the field. You can see this functionality in action below as we assign a Designated User to one of our Parts.
In this post, we'll cover how we can manipulate this type-ahead functionality to make work even easier for our users.
Dynamically Populate Dropdown
One common question we hear on the forums is how to dynamically populate a dropdown field.
You can easily adapt this code to populate a completely empty dropdown as well.
Filter Item Field Type-Ahead
A few months ago, we put out a blog that demonstrated how to apply a filter to a search dialog. One question we received on this post was how to apply the same filter to the options in the type-ahead of the field as well. The sample code below shows precisely how to do that by overriding the call to the server that generates the options for the type-ahead.
This sample ensures that only specific, individual Users can be assigned as the creator of a Part. If we compare the clip below to the one at the beginning of this post, we'll notice that Group Identities like Manufacturing are no longer offered.