Marking form data as updated - InfoPath Dev
in

InfoPath Dev

Marking form data as updated

Last post 10-25-2004 02:07 PM by Greg Collins. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-25-2004 08:08 AM

    • jonbrave
    • Top 200 Contributor
    • Joined on 10-15-2004
    • United Kingdom
    • Posts 59

    Marking form data as updated

    Brief question:
    How do I get InfoPath to accept data returned from Submit as latest/"original" data in database?

    Long question:
    * Using InfoPath connected to WebService
    * Form is an "update row" form, has "Run Query" & "Submit" (-type) buttons
    * I "Run Query" to initially populate with row
    * "FieldA" has value "Original" in it
    * I change that to "New 1", and "Submit"
    * Database updated via web service; it receives InfoPath "dataFields" via DataSet input parameter *and returns this as result from webservice, with OutputLocation bound to IP dataFields*
    * Form stays on screen
    * I change "FieldA" again, this time to "New 2", and "Submit" again
    * Now data passed to webservice from IP indicates that "original" value of "FieldA" is still "Original", so generated SQL for Update does not find record to update (because by now it's "New 1"), and update fails

    So I'm asking how can I get IP to accept data in dataFields as
    "OriginalData" after Submit? I have hacked a
    XDocument.QueryAdapter.Query();
    onto end of XDocument::OnSubmitRequest() just before returning; this seems to get IP to accept new data via new query, but it doesn't feel right: is there a call to tell IP to update it's idea of "OriginalData" from what's in dataFields without having to requery??



  • 10-25-2004 02:07 PM In reply to

    Re: Marking form data as updated

    Adding a Query to the end seems reasonable. I was going to suggest that.

    Is that the correct solution? I'm not sure. It seems like once you submit that there should be some sort of sync that happens between the form and the database. But since you are using a Web service, it's not surprising that that sync isn't happening. I would assume that if you submitted directly to the database without the Web service, that this would work as you desired.

    Because the Web service is there, I'm assuming your solution is the correct one.

    Someone may wish to correct me on this, and you should certainly seek a second opinion from other sources. If you find a better answer, please post it here!

    Greg Collins [InfoPath MVP]
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.