Submit form data to several locations InfoPath 2007

Author: mety Labels::



You can design your form template so that users can submit their form data to several locations when they click the Submit button.

To allow users to submit their form data to several locations, you must add a secondary data connection to your form template that submits the data for each of the locations where you want users to submit their form. After you add all of the submit data connections, you configure the form template to allow users to submit their form data to multiple locations by using a rule (rule: A condition or action, or a set of conditions or actions, that automatically performs tasks based on events and values in the form.). As a result, Microsoft Office InfoPath adds a Submit button to the Standard toolbar and a Submit command to the File menu when users fill out the form. InfoPath submits the form data to the secondary data connections in the order that they are listed in the rule. You cannot configure the rule to use all of the submit data connections at the same time.
When you configure the form template to allow users to submit their form data, you can also customize the submit options in the following ways:
  • Change the text that appears on the Submit button on the Standard toolbar and the Submit command on the File menu.
  • Change the keyboard shortcut for the Submit button on the Standard toolbar and the Submit command on the File menu.
  • Create custom messages to display to your users when they submit their forms.
  • Specify whether to leave the form open, close the form, or open another blank form after the form is submitted.


Step 1: Add the submit data connections

To configure the form template to allow users to submit their completed forms to multiple locations, you add the necessary submit data connections to the form template. You can add data connections to the following locations:
  • A Web service
  • A document library on a server running Microsoft Windows SharePoint Services
  • In an e-mail message Note Users need Microsoft Office Outlook installed on their computer in order to submit the form data in an e-mail message.

The following procedures explain how to add submit data connections to these locations.

Add a data connection that submits data to a Web Service

  1. On the Tools menu, click Data Connections.
  2. In the Data Connections dialog box, click Add.
  3. In the Data Connection Wizard, click Create a new connection to, click Submit data, and then click Next.
  4. On the next page of the wizard, click To a Web service, and then click Next.
  5. On the next page of the wizard, type the location of the Web service where your users will submit their forms, and then click Next. Note If you want to search a Universal Description, Discovery, and Integration (UDDI) server for a Web service, click Search UDDI, enter the UDDI server that you want to search for, specify whether you want to search by provider or by the services that are provided, enter a search keyword, and then click Search. Web services that match your search keyword will appear in the Search result list.
  6. On the next page of the wizard, in the Select an operation list, click the Web service operation that will receive the form data, and then click Next.
  7. On the next page of the wizard, do one of the following: ShowSubmit the data in a field or group
    1. In the Parameters list, click a Web service parameter that will receive the data from the form.
    2. In Parameter options, click Field or group.
    3. Click ModifyButton image .
    4. In the Select a Field or Group dialog box, click the field or group whose data you want to submit, and then click OK.
    5. In the Include box, click Text and child elements only to submit just the contents and any child elements of the field or group, or click XML subtree, including selected element to submit both the content and the selected group or field.
    ShowSubmit all of the data in the form
    • Click Entire form (XML document, including processing instructions).
    ShowSubmit the data as a string
    • Select the Submit data as a string check box. Tip Typically, you select this check box to submit digitally signed data. In most cases, clear this check box.
  8. Click Next.
  9. On the next page of the wizard, in the Enter a name for this data connection box, type a descriptive name for this submit data connection.
  10. Verify that the information is correct in the Summary section, and then click Finish.

Add a data connection that submits data to a document library

  1. On the Tools menu, click Data Connections.
  2. In the Data Connections dialog box, click Add.
  3. In the Data Connection Wizard, click Create a new connection to, click Submit data, and then click Next.
  4. On the next page of the wizard, click To a document library on a SharePoint site, and then click Next.
  5. On the next page of the wizard, in the Document library box, type the location of the SharePoint document library.
  6. In the File name box, type a name that will be used to identify the form in the document library. You can also use a formula to ensure that each form name is unique. ShowHow?
    1. Click Insert Formula Button image.
    2. In the Insert Formula dialog box, do one of the following:
      • To use a field in the formula, click Insert Field or Group, click the field that you want to use in the Select a Field or Group dialog box, and then click OK.
      • To use a function in the formula, click Insert Function, select the function that you want to use in the Insert Function dialog box, and then click OK. Tip If the function requires parameters, select the function in the Insert Function dialog box, click OK, and then in the Formula box in the Insert Formula dialog box, double-click the function that you added, and click a field or group. Find links to more information about functions in the See Also section.
      • To insert a value or mathematical operator into the formula, type the value or the symbol for the mathematical operation in the Formula box.
        OperationSymbol
        Add+
        Subtract-
        Multiply*
        Divide/

        Note If your formula uses the division (/) operator, make sure that there is a space before and after the division operator. If the division operator does not have a space before and after it, InfoPath may interpret "/" as a separator for XPath location steps rather than as a division operator.
    3. To check the formula for the correct syntax, in the Insert Formula dialog box, click Verify Formula. Find links to more information about formulas in the See Also section.
  7. To overwrite any existing forms with the same name in the document library, select the Allow overwrite if file exists check box.
  8. Click Next.
  9. On the next page of the wizard, in the Enter a name for this data connection box, type a descriptive name for this submit data connection.
  10. Verify that the information is correct in the Summary section, and then click Finish.

Add a data connection that submits data in an e-mail message

  1. On the Tools menu, click Data Connections.
  2. In the Data Connections dialog box, click Add.
  3. In the Data Connection Wizard, click Create a new connection to, click Submit data, and then click Next.
  4. On the next page of the wizard, click As an e-mail message, and then click Next.
  5. On the next page of the wizard, type the e-mail addresses of the recipients of the message, the subject that you want to appear in the message, and any introductory text that you want in the appropriate boxes, and then click Next. You can also use a formula in each box except for the Introduction box. ShowHow?
    1. Click Insert Formula Button image.
    2. In the Insert Formula dialog box, do one of the following:
      • To use a field in the formula, click Insert Field or Group, click the field that you want to use in the Select a Field or Group dialog box, and then click OK.
      • To use a function in the formula, click Insert Function, select the function that you want to use in the Insert Function dialog box, and then click OK. Tip If the function requires parameters, select the function in the Insert Function dialog box, click OK, and then in the Formula box in the Insert Formula dialog box, double-click the function that you added, and click a field or group. Find links to more information about functions in the See Also section.
      • To insert a value or mathematical operator into the formula, type the value or the symbol for the mathematical operation in the Formula box.
        OperationSymbol
        Add+
        Subtract-
        Multiply*
        Divide/

        Note If your formula uses the division (/) operator, make sure that there is a space before and after the division operator. If the division operator does not have a space before and after it, InfoPath may interpret "/" as a separator for XPath location steps rather than as a division operator.
    3. To check the formula for the correct syntax, in the Insert Formula dialog box, click Verify Formula. Find links to more information about formulas in the See Also section.
  6. On the next page of the wizard, do one of the following:
    • To display the form in the body of the e-mail message, click Send only the active view of the form and no attachment.
    • To send the form data as an attachment to the e-mail message, click Send the form data as an attachment, select the Attach the form template to ensure that users can open the form check box, and then type a name for the form in the Attachment Name box. You can also specify a field or use a formula to ensure that each form name is unique. This option is only avaliable if the form template is configured to automatically determine the security level or is configured to the Restricted or Full Trust security level. ShowHow?
      1. Click Insert Formula Button image.
      2. In the Insert Formula dialog box, do one of the following:
        • To use a field in the formula, click Insert Field or Group, click the field that you want to use in the Select a Field or Group dialog box, and then click OK.
        • To use a function in the formula, click Insert Function, select the function that you want to use in the Insert Function dialog box, and then click OK. Tip If the function requires parameters, select the function in the Insert Function dialog box, click OK, and then in the Formula box in the Insert Formula dialog box, double-click the function that you added, and click a field or group. Find links to more information about functions in the See Also section.
        • To insert a value or mathematical operator into the formula, type the value or the symbol for the mathematical operation in the Formula box.
          OperationSymbol
          Add+
          Subtract-
          Multiply*
          Divide/

          Note If your formula uses the division (/) operator, make sure that there is a space before and after the division operator. If the division operator does not have a space before and after it, InfoPath may interpret "/" as a separator for XPath location steps rather than as a division operator.
      3. To check the formula for the correct syntax, in the Insert Formula dialog box, click Verify Formula. Find links to more information about formulas in the See Also section.
      Note The e-mail recipients of the form data that is sent as an attachment will need InfoPath installed on their computer to open the attachment.
  7. Click Next.
  8. On the next page of the wizard, in the Enter a name for this data connection box, type a descriptive name for this submit data connection.
  9. Verify that the information is correct in the Summary section, and then click Finish.

Step 2: Configure the form template to allow submission

After you add the necessary secondary data connections to your form template, you configure the form template to allow users to submit their form data. When you do this, InfoPath adds a Submit command to the File menu and a Submit button to the Standard toolbar when users fill out the form. You can then configure the action that occurs when the user clicks the Submit button. In this case, you will add a rule that submits the form data to each submit data connection when the user clicks the Submit command on the File menu or the Submit button on the Standard toolbar.
Note In the same dialog box, you can configure the submit options.
  1. On the Tools menu, click Submit Options.
  2. In the Submit Options dialog box, select the Allow users to submit this form check box.
    Note When you select this check box, InfoPath adds a Submit button to the Standard toolbar and a Submit command to the File menu when users fill out the form.
  3. Click Perform custom action using Rules, and then click Rules.
  4. In the Rules for Submitting Forms dialog box, click Add.
  5. Click Add Action.
  6. In the Action box, click Submit using a data connection, click the data connection that you want to use for this submit action in the Data connection list, and then click OK.
  7. Repeat steps 5 and 6 for each submit data connection that you have added to your form template.
  8. After you add conditions for all of the submit data connections in your form template, click OK twice.
  9. To change the name of the Submit button that appears on the Standard toolbar and the Submit command that appears on the File menu when users fill out the form, type the new name in the Caption box in the Submit Options dialog box.
    Tip If you want to assign a keyboard shortcut to this button and command, type an ampersand (&) before the character that you want to use as a keyboard shortcut. For example, to assign ALT+B as the keyboard shortcut for the Submit button and command, type Su&bmit.
  10. To prevent users from using the Submit command or the Submit button on the Standard toolbar when they fill out your form, clear the Show the Submit menu item and the Submit toolbar button check box.
  11. By default, after users submit a form, InfoPath keeps the form open and displays a message to indicate if the form was successfully submitted. To change this default behavior, click Advanced, and then do one of the following:
    • To close the form or create a new blank form after the user submits a completed form, click the option that you want in the After submit list.
    • To create a custom message to indicate if the form was successfully submitted, select the Use custom messages check box, and then type your messages in the On success and On failure boxes.
      Tip Use a message in the On failure box to tell users what to do if they cannot submit their form. For example, you can suggest that users save their form and contact someone for further instructions.
    • If you do not want to display a message after the user submits a form, clear the Show success and failure messages check box.

0 comments |

Labels

Blog Archive

Powered by Blogger.

I made these pages for me and my friends to help solving the problem we face regarding Computer & internet, if anyone wants me to answer a question or find out about some information please send me email and I will try to reply.*P.S. some of the article I wrote and the other I found on the internet I posted them in sprit of learning and shearing, please forgive me if you found something you don’t want to be in my blog, email me and I will delete them. Thank you for your interest in my pages.امل نجم Amal Nagm

banner 1 banner 2