NetTalk Central

Author Topic: New Partial Save button introduced in 14.17  (Read 3752 times)

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
New Partial Save button introduced in 14.17
« on: March 15, 2024, 07:12:52 AM »
Hi Bruce,

     I have been experimenting with the Partial Save button added with NT 14.17.  I have a GUID field in my tables, which is set as unique.  This causes a problem: 

     When adding a new record the form is in insert mode.  Clicking the Partial Save button saves the record, including the GUID field and sets the form to change mode.  Upon clicking the Partial Save button again (while in change mode), an error pops up about a duplicate key on the GUID field. 

    Maybe I can add code to change the GUID when using the Partial Save button, but this does not seem to be a good idea.  For now, I have set the Partial Save button to be disabled when in insert mode.  Any thoughts on how to handle this issue better?

Thanks,

Jeff
« Last Edit: March 15, 2024, 07:17:54 AM by jking »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: New Partial Save button introduced in 14.17
« Reply #1 on: March 15, 2024, 11:49:18 PM »
Hi Jeff,
tweak an example program to show the effect, and I'll take a look.
Obviously changing the GUID is not helpful.

Cheers
Bruce

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: New Partial Save button introduced in 14.17
« Reply #2 on: March 16, 2024, 06:13:42 PM »
Hi Bruce,

     I was able to duplicate the issue in the Web1 example app.  I have attached a zip file with the app, dct and tps files needed.

I added a GUID field to the mailbox.tps file and set it as unique.  In the Validate Insert, 2Inside embed I coded to set the GUID.  I added a Partial Save button to the MailboxesFormControl.

To duplicate the error message, Insert a new record with the Mailbox form, and click the Partial Save button twice. 

That should do it.

Thanks for looking at this.

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: New Partial Save button introduced in 14.17
« Reply #3 on: March 18, 2024, 06:56:58 PM »
thanks, fixed for 4.20

Aside: For forms with Guids, the Guid field should be primed to a random value on the priming tab (if you allow partial saves). Otherwise you'll encounter problems when multiple users use the form at the same time.

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: New Partial Save button introduced in 14.17
« Reply #4 on: March 19, 2024, 09:57:01 AM »
Bruce,

     Thanks!  I'll try 14.20 as soon as it is released.

Jeff

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: New Partial Save button introduced in 14.17
« Reply #5 on: March 26, 2024, 05:23:54 AM »
Hi Bruce,

     Just a quick note that 14.20 has solved the issue with the Partial Save button.  Thanks!