NetTalk Central

Author Topic: How to cancel OK  (Read 4111 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
How to cancel OK
« on: January 24, 2012, 06:13:11 PM »
I need to handcode some validation on my form so that if some values are missing then OK throws a message and returns to the form.

I have found the embed point to use but not sure how to actually cancel.

Thanks

John

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: How to cancel OK
« Reply #1 on: January 24, 2012, 06:30:46 PM »
Embed is generally ValidateAll (%ValidateRecordEnd:

If validation fails
  INV:Number:IsInvalid = true ![editor note] remember this line as well Kevin
  Loc:Invalid = 'INV:Number'     !field to return focus to on form
  Loc:Alert = 'Your Message'
  Exit
End
« Last Edit: January 25, 2012, 12:41:39 AM by Bruce »

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: How to cancel OK
« Reply #2 on: January 25, 2012, 12:44:39 AM »
Thanks Kevin. Got the alert stuff and even the embed. Never even thought of using EXIT. That's the magic word!

John