Home » Developer & Programmer » Forms » Problem while saving the records
Problem while saving the records [message #461532] Fri, 18 June 2010 10:40 Go to next message
dhanasurya
Messages: 33
Registered: May 2010
Member
Hi All,
I am facing a problem while saving the records in my form.I have written code(inserting data into the custom able) in KEY-COMMIT trigger and when_buton_pressed trigger of submit button.

If i click on submit records are inserting into the custom table.After click on save button,the records are inserted again in the table.

I want to save the records only once either click on submit or click on Save button in the menu bar.

Please solve my issue.

Thanks in Advance,

Re: Problem while saving the records [message #461534 is a reply to message #461532] Fri, 18 June 2010 11:31 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

Before inserting into the table, get the count from the table to see whether the record is already exists or not. if it is not available in table then insert else dont.
or
you can create a block with your custom table as base and use the forms functionalities for insert and update.
Re: Problem while saving the records [message #461535 is a reply to message #461534] Fri, 18 June 2010 11:44 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
By all means; the last Klat's sentence is probably the best solution. Why would you insert twice: once with an (unnecessary) INSERT statement (you wrote), and once again as Forms built-in functionality?

Why did you use INSERT, anyway?
Previous Topic: converting rdf report to excel format
Next Topic: New record
Goto Forum:
  


Current Time: Fri Sep 20 00:49:30 CDT 2024