Submit form data to a Web service InfoPath 2007

Author: mety Nagm Labels::



If you want your users to submit their form data to a Web service, you can add a submit data connection to your form template as a secondary data connection. Depending on the types of data that the Web service accepts, you can configure the submit data connection to submit either the data in a specified field, the data in all of the fields in a group, or all of the data in the form.
After you add the submit data connection, you configure the form template to allow users to submit their form data to the Web service. As a result, Microsoft Office InfoPath adds a Submit button to the Standard toolbar and a Submit command to the File menu on the form. You can also customize the submit options for your form template 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.

Add the submit data connection

  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.
  3. Click Send form data to a single destination, and then click Web service in the list.
  4. Click Add.
  5. In the Data Connection Wizard, type the location of the Web service where your users will submit their data, and then click Next. Tip 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, 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 you want to use to receive the form data, and then click Next.
  7. On the next page of the wizard, to select what data in the form to submit for each parameter in the Web service, do one of the following: ShowSubmit the data in a field or group
    1. In the Parameters list, click the Web service parameter that will receive the data from the form.
    2. In Parameter options, click Field or group.
    3. Click Modify Button 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 data in this field and the child elements of the field or group, or click XML subtree, including selected element to submit the field name, the data in the field, and the child elements in the selected group or field.
    ShowSubmit all of the data in the form
    1. In the Parameters list, click the Web service parameter that will receive the data from the form.
    2. Under Parameter options, click Entire form (XML document, including processing instructions).
    ShowSubmit the data as a string
    1. In the Parameters list, click the Web service parameter that will receive the data from the form.
    2. Under Parameter options, click Entire form (XML document, including processing instructions).
    3. Select the Submit data as a string check box. Note Typically, you select this check box to submit digitally signed data. In most cases, clear this check box.
    ShowTechnical details about Microsoft ADO.NET DataSet objects
    If the Web service requires an ADO.NET DataSet object, select a DataSet node when you configure this data connection. If you use any other type of node for a data connection to a Web service that requires an ADO DataSet, the submit action will fail.
  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. 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.
  11. Verify that the information is correct in the Summary section, and then click Finish.
  12. To allow users to use the Submit command or the Submit button on the Standard toolbar when they fill out your form, select the Show the Submit menu item and the Submit toolbar button check box.
  13. 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