NetTalk Central

Author Topic: Change value before insert / save  (Read 2768 times)

rupertvz

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
    • Email
Change value before insert / save
« on: January 19, 2012, 04:46:50 AM »
Hi Guys,

I have a NetWebBrowse with a NetWebForm
The user is selecting some values on the form
I'd like to change / overwrite some values, just before the record is finally inserted / saved to the database from the form.

What will be the best embed to use in the form for the above ...?

Thanks
Rupert

rupertvz

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
    • Email
Re: Change value before insert / save
« Reply #1 on: January 19, 2012, 04:53:59 AM »
I think I found the correct embed for this;

PREINSERT, after END
PREUPDATE, after END

?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Change value before insert / save
« Reply #2 on: January 19, 2012, 05:24:58 AM »
PreInsert and PreUpdate happen when the form is opened.
(This is where the items on the Priming tab go)

If you want to do it after the click on the save button, before the record is written, then use the ValidateRecord routine.

Cheers
Bruce