NetTalk Central

Author Topic: Forms creating empty records  (Read 3563 times)

Matthew51

  • Full Member
  • ***
  • Posts: 152
    • View Profile
    • Email
Forms creating empty records
« on: July 31, 2009, 01:57:44 PM »
When you use a form to insert a new record a blank recored is instantly created in the file.  The record had no data except for auto numbered fields, even if this defies rules you set in the dictionary.  If you then click cancel the empty record is deleted.  However if you navigate away the record stays in the file.

Since a new record is created every time this is done it can make a big mess of a file.  Is their any way to ether delete the record once you leave the form, or just delay writing it until the form is posted?
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Forms creating empty records
« Reply #1 on: July 31, 2009, 11:29:58 PM »
Hi,

I remember a reply by Bruce.
In the validation part of the form, after all rules are passed, you can write the session number into a designated field (e.g. XXX;Session) in the record (don't do this in the priming part if the template, it has to be done after 'Save' is clicked.)
Later you can run or schedule a special procedure which deletes all records where XXX:Session is equal to zero or blanks.
So yes, there is a mess. But only for as long as you allow it

HTH
René Simons
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Forms creating empty records
« Reply #2 on: August 02, 2009, 09:29:27 AM »
Hi Matthew,

>> Is their any way to ether delete the record once you leave the form

There's no such thing as "leaving the form". The form got generated and sent to the browser. Then it closes the connection. The user might close their browser or turn off their machine or whatever.

By default NetTalk will only create the record if there's a "reason to". Typically the reason is that you have a child browse on the Form. (in other words allowing children to be saved before the parent is saved.)

You can override the behavior, either telling it not to generate the parent, or always generate the parent. These are settings on the Advanced tab of the form.

cheers
Bruce