Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

InfoPath Drop Downs using SharePoint 2013 REST

Ever had the need to map a Choice Field to a drop down list in InfoPath?
SharePoint REST API makes this super easy! gone are the days of Lookup Lists and Lookup Columns. No need to maintain two sets of values either!

A rather unknown feature of SharePoint 2010 onwards is the fact that the REST interface, the one you access via /_vti_bin/listdata.svc, also gives you access to your choice fields in a simple XML format. Effectively the new choice field becomes a new entity at the same level as the list/library with a concatenated name.
So if you list is called Customers and the choice field is called Region, the url would look as such:
/_vti_bin/listdata.svc/CustomersRegion
SharePoint will spit a RSS formatted feed back out at you with all the choices listed :-)

All you need to do now is go to your InfoPath form, create a new data source, select REST Web Service as the source and paste the url to the choice list. Press OK and Finish, and now you can use that data source for your drop down values by:

  • Modifying the Drop Down List Box Properties
  • Choose  Get values from an external data source
  • Pick the REST data source
  • For Entries source pick /ns1:feed/ns1:entry
  • For Value and Display Name pick ns1:title
Done! you now have an InfoPath drop down list powered dynamically by your SharePoint Choice field!


This post first appeared on SharePoint Training, Alex Dean, please read the originial post: here

Share the post

InfoPath Drop Downs using SharePoint 2013 REST

×

Subscribe to Sharepoint Training, Alex Dean

Get updates delivered right to your inbox!

Thank you for your subscription

×