Saving a secondary datasource - InfoPath Dev
in

InfoPath Dev

Saving a secondary datasource

Last post 10-09-2007 01:54 AM by adamrharding. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-08-2007 12:43 AM

    • spudy
    • Top 150 Contributor
    • Joined on 03-23-2006
    • United Kingdom
    • Posts 67

    Saving a secondary datasource

    Is there a simple way of creating an XML output file from a secondary datasource. My form has much functionality and does not connect to any other datasources for information. What I want to do is add at third party XML schema as a secondary datasource and add values to this datasource from my main form and then produce an XML output file.

    The third party schema is quite complex and I don't need much of it populated - just a few fields which I can do as rules during functionality on the main form. I want to have a button that creates the ouput XML.

    I know this has to be possible. Any guidance here will be appreciated.....

    Thanks Spudy.

  • 10-08-2007 04:14 AM In reply to

    Re: Saving a secondary datasource

    Hi

    I think the simplest way to achieve this would be to add a data connection to a web service that then connects to the output XML file.  Natively InfoPath does not allow amendment of secondary data connections unless it is via a web service.  Then link the button to the web service data connection and there you are.

    Job done

    Adam

    Adam Harding
    Wales
    UK
  • 10-08-2007 06:52 AM In reply to

    • spudy
    • Top 150 Contributor
    • Joined on 03-23-2006
    • United Kingdom
    • Posts 67

    Re: Saving a secondary datasource

    Thanks Adam. Unfortunately I will not have access to web services as the machine collecting the information will be a tablet PC in an offline mode. I suppose the next question is if it is possible to create a new xml file with a schema defined by secondary datasource?

    Regards Paul

  • 10-09-2007 01:54 AM In reply to

    Re: Saving a secondary datasource

    Hi

    The simplest way to achieve what you want is to make the third-party data source your main data source (as you are not utilising any other databases), that way the third party data can publish into the form.  Then do not submit the data back to the database but rather on email as an XML file.  It will sit in their outbox until networked at which point the .XML file is submitted via email.

    If you choose not to do this then the user could click 'Save' or 'Save As' to create an output .XML file, this however would contain no routing.  Furthermore, you can write code before the save operation and after the save operation by going into Form Options, 'Open and Save' and then tick 'save using custom code'

    I hope this helps

    Adam (Cardiff)

    Adam Harding
    Wales
    UK
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.