Microsoft InfoPath 2010
The official blog of the Microsoft InfoPath team

Converting a Data Source

Converting a Data Source

Rate This
  • Comments 3

For anyone who has developed an InfoPath form template against a schema, database, or Web service that has changed since the form template was initially created, the following should be some good news.  The SP1 Preview Release of InfoPath contains the ability to provide InfoPath with an updated version of your schema or data source and InfoPath will update your solution accordingly.  That’s right, gone are the days of hand modifying the XSF, template file, XSL, etc. in order to change the schema.  You can change your main data source via the ToolsàConvert Main Data Source menu entry or a data connection via the modify button for that source in the ToolsàData Connection dialog.

When you provide InfoPath the updated data source, InfoPath will update the schema files stored in the form template and look for and apply changes between the old and new data source.  In particular InfoPath will look for type changes, cardinality changes, namespace changes, adds, deletes, renames, and move operations.  For any recognized operation, all existing bindings in the view, XSF, and event handler hookup will be fixed accordingly (note, it is still your responsibility to fix business logic code.)  Unfortunately InfoPath is not omnipotent, so it might not be the best idea to wait until you have renamed, moved, and extremely modified the children of an element before providing the updated schema to InfoPath ;-)

(And if a menu option to update your data source isn't convenient enough, tomorrow we'll start a five part series on the InfoPath Team Blog showing you how you can automate this sort of operation by taking advantage of InfoPath's XML-based form template file format.) 

Leave a Comment
  • Please add 7 and 6 and type the answer here:
  • Post
  • hello!

    how can I achieve the same in InfoPath 2010?

    thank you!

  • In InfoPath 2010, the option is "Refresh Fields" which is located on the Data tab.

  • I am not able to find (Tools -> Convert Main Data Source ) in infopath. Can any one help.

    Thanks

Page 1 of 1 (3 items)