Urgent help required! How can I get a form to check if a record exist before submitting? - InfoPath Dev
in

InfoPath Dev

Urgent help required! How can I get a form to check if a record exist before submitting?

Last post 09-03-2010 02:29 AM by Jose9Reyes. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-02-2010 01:14 PM

    Urgent help required! How can I get a form to check if a record exist before submitting?

    I have an access database and a form which is getting filled out by Engineers and emailed into the office. The form will be opened and a user will press submit to store the date. At the moment I have this set up, but the record cannot be added due to a record already existing (imported a list of records). What is the easiest way I can check if a record exists and then replacing it? I have programing knowledge and have looked around for ideas but to no avail. Help would be much appreciated.
  • 09-02-2010 11:05 PM In reply to

    Re: Urgent help required! How can I get a form to check if a record exist before submitting?

    How about changing your Submit to first Query the connection and look for the record. If it finds it, display a dialog box saying it already exists and stop processing rules. If not, it keeps processing and submits the new record?

    Patrick Halstead
    Project Manager at Qdabra
  • 09-02-2010 11:24 PM In reply to

    Re: Urgent help required! How can I get a form to check if a record exist before submitting?

    OK, if it exists how would I go about overwriting the existing record?
  • 09-03-2010 01:01 AM In reply to

    Re: Urgent help required! How can I get a form to check if a record exist before submitting?

    If you query that record you should get an ID and if you use that with the submit, it should automatically overwrite.

    Patrick Halstead
    Project Manager at Qdabra
  • 09-03-2010 02:29 AM In reply to

    Re: Urgent help required! How can I get a form to check if a record exist before submitting?

    Ok, I've quiered the table before submitting and the record is found (I've tested this with the use of a display message). However when it tries to submit I get the following error :

    InfoPath cannot submit the form.
    Some rules were not applied.
    InfoPath cannot submit the form.
    An error occurred while the form was being submitted.
    The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again

     I have an ID key, sitePin(Primary key). Im using the sitePin to locate the record. I know this is caused because of the primary key not being able to change but not sure how to work around it.

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.