Submit new records & later retrieve a record by ID - InfoPath Dev
in

InfoPath Dev

Submit new records & later retrieve a record by ID

Last post 11-01-2006 09:52 AM by Shiraz Cupala. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-31-2006 02:49 PM

    Submit new records & later retrieve a record by ID

    I posted this in the "newbie" section before but then I found this section as a btter fit. I will try to delete the other post next.

    Anyways, this is what I have done so far:

    1. Designed an InfoPath form based on an Xml schema.
    2. Created a submit connection to a web service and passed the entire form XML to the web service.
    The web service stores the XML in SQL database in a text column and assigns it an ID (another ID column).
    This has been tested - I can see the XML in the database.
    3. Create a receive connection to the same web service (another method) that can take an ID and return the corresponding XML.

    This also works - I can view the XML being returned as a text in a textbox (done for testing purposes only). Please note that I had hard-coded the ID for which the form XML was retrieved.

    This is what I would like to do next:
    1. I would like to set/replace the form's entire XML with what is returned by the web service.
    2. From another user interface (say, an ASP.NET GridView) I would like to pass the ID as parameter to the InfoPath form and the form should use this ID to receive the corresponding XML. Then it should do what is requested in #1 above i.e. set/replace the form's entire XML with the XML returned by the web service.

    I will appreciate any help on this.

  • 11-01-2006 09:52 AM In reply to

    Re: Submit new records & later retrieve a record by ID

    For #1) You will have to write code to copy from the secondary data source into the main data source.

    For #2) The easiest way to do this is to open a stub XML file with a node with the ID and then onLoad have the InfoPath form query the DB with the parameter and then do #1.

    Also, another way to approach this is to redo the form as connected to the Web Service which will eliminate the code and make your Main Data Source directly work with the DB. Unfortunately, to do this you have to create a new form that works with the WS and then copy paste all your views and redo your logic (not fun).
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.