Section 7.3.Share Data


7.3. Share Data

Sharing a form template is easyjust publish the template to a public location and InfoPath users can create new XML data files using that form. Sharing data is harder: if you post the XML data file at a public location, multiple users may view the data through the form, but only one can have the file open for changes.

If you want multiple users to be able to edit XML data at the same time, there are a couple of solutions:

  • Have each user create a separate, standalone XML data file and then merge those files

  • Use InfoPath's Submit feature to manage changes

7.3.1. How to merge multiple files

This is the simplest technique for gathering edits from multiple users and it's easy to illustrate using our old Asset tracker form shown earlier. Say, for instance, each department is doing their own asset inventory and each department manager assigns one worker to gather the data for his department. Each of those workers opens Assets.xsn to create a new XML data file for their department. When all the work is complete, a supervisor opens Assets.xsn to create a new XML data file and merges all of the department files.

In this situation, it is ideal if the form template was published to a SharePoint Site since SharePoint provides a handy interface for creating new XML data files based on an InfoPath form (Figure 7-12).

Figure 7-12. Entering department data


Department workers simply click Fill Out This Form to start entering their asset information. When all of the departments are complete, the supervisor clicks Fill Out This Form, then chooses File Merge Forms to merge the department files (Figure 7-13). Finally, the supervisor saves the merged data file.

This approach works well where individuals are responsible for well-defined tasks. Asset tracking, sales reports, and expense reports all fall into this category. In other cases, live data must be shared in a more interactive fashion.

Figure 7-13. Merging data from departments


7.3.2. How to use Submit

Forms that are designed to work with databases or web services can submit their data to the data store rather than saving it as an XML file. In those cases, form data is transmitted to the data store where it is available to other users.

If a form allows Submit, then Submit appears on the File menu when the form is in user mode. Users can still save form data; however, they are prompted to see if they really want to Submit the form (Figure 7-14).

If an error occurs during submit, InfoPath reports it, as shown in Figure 7-15.

The InfoPath errors are not usually clear enough for users to interpret. For example, the error shown in Figure 7-15 occurred because an invalid Customer ID was entered. You should carefully validate data before submitting it to a data store.

Figure 7-14. Forms that submit data can also save it, but users are prompted first


Figure 7-15. Errors are displayed if the data could not be updated


7.3.3. How to submit via email

InfoPath also lets you send form data as an attachment in mail. In order for this feature to work, you must have Outlook 2003 installed as the default mail client on your system.

To send form data as email:

  • Choose File Send to Mail Recipient. InfoPath starts Outlook 2003 and creates a new mail message with the form data attached.

When another InfoPath user receives form data via email, she can open, save, or merge that data provided she has access to the published form template.

7.3.4. What about...

To learn aboutLook here
Creating a form based on a database table"Link a Form to a Database"




    Excel 2003 Programming. A Developer's Notebook
    Excel 2003 Programming: A Developers Notebook (Developers Notebook)
    ISBN: 0596007671
    EAN: 2147483647
    Year: 2004
    Pages: 133
    Authors: Jeff Webb

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net