Submit Once - InfoPath Dev
in

InfoPath Dev

Submit Once

Last post 07-27-2006 05:49 PM by gw2kbust. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-27-2006 05:08 AM

    Submit Once

    I'm created a form which submits to an access database. The submittal is written in C#. When the user submits the form, it asks if you would like to save the form. I have it save the form in .xml. Then the user can refer back to the form at a later time. My question is, is there a way that if a field is changed on the form, and submit is pressed, that it will only change that field in the database? Currently, it re-submits the entire form. Thanks for your help.
  • 07-27-2006 06:26 AM In reply to

    Hello

    Do you have any Particular set of fields which will be changed? or is it random? As you know the Submit button in the Infopath form updates all the fields in the database when resubmitted
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 07-27-2006 06:41 AM In reply to

    Hey. If you submit using your own form code, then the submit keeps re-entering the data in the database. It does NOT update previous information. Let me know what you think. Thanks!
  • 07-27-2006 07:56 AM In reply to

    Hello

    You should have a Primary key Set in your Access database and have a Unique ID created for the form. Write a Code that whenever the form is submitted the form searches for the unique ID. if it is present, the row is updated else a new row of data is created.
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 07-27-2006 08:12 AM In reply to

    Thanks again for the reply. I really appreciate it.
    The only problem is, what happens when a user decides to add more rows after they have already submitted the form? I want the form to be able to update any existing rows and add any new rows. Let me know what you think. Thanks!
    By the way, I can not use a web service either if you were curious. This has to work through infopath via rules or c# code. Thanks!
  • 07-27-2006 08:33 AM In reply to

    Hello,

    You should get the Forms from the database. It seems that you are opening the forms locally saved and submitting them to the database wherein the forms are submitted as new ones in the database.
    First thing is that you should have the forms get from the database by Run query and then having the unique ID in the form and Primary key in the database and using the code you can update the forms or add new rows.

    Hope it helps you.
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 07-27-2006 05:49 PM In reply to

    Fixed with a for loop and a sql delete statement. Thanks though!
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.