I have been working on developing a simple approval form for the top level executives at a fortune 500 company. The form had to look really nice, and since I am quite facile using InfoPath 2010 together with SharePoint 2010, I decided to take that route.
This choice allowed me to develop a prototype, which evolved into the production form rather quickly. Everything was going along perfectly, until I hit a bump in the road. For one of the form fields, the project sponsors needed users to pick from a list of some 2000+ entries. The drop-down list that I had been using, was not going to be adequate, since choosing from a list of 2000+ choices is a terrible user experience. To solve this issue, several of my colleagues suggested that I use the new SharePoint 2010 Managed Metadata feature, which provides an autocomplete feature. Unfortunately it turns out that Microsoft does not support Managed Metadata inside InfoPath 2010. (Just do a Google search for "managed metadata infopath" and you will find plenty of hate mail!)
The inability to have autocomplete for this key field was going to be a show stopper. Well I called up my friend and colleague Marc Anderson, MVP and author of SP Services. Marc suggested that we get together for a day. We did, and he helped me solve the problem.
Since SharePoint 2010 embeds the form web part into web part pages, we were able to populate a Content Editor Web Part with the appropriate Javascript and leveraged jQuery, jQueryUI, and SPServices. Marc's blog summarizes how it works.
The picture below illustrates the autocomplete functionality that we wound up using. In the picture, I used a list with Cities for test data. In the picture, you can see that I typed new, and all the choices that include the the letter sequence new are provided.
This was a huge win for me. In the past, this would have been a show stopper and I would have had to start all over again using a different choice of technologies. The bigger lesson that I took from this is that many of the user interface limitations that are inherent in InfoPath can now be overcome becuase one can easily mix and match InfoPath with Javascript and all the web based standards that can be leveraged.
Comments