NetTalk Central

Author Topic: ValidateUpdate embed and Alert message  (Read 6120 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
ValidateUpdate embed and Alert message
« on: July 28, 2010, 12:06:13 AM »
Hallo,


I have in a form in ValidateUpdate embed , some code to check if a value is true or false. After this code I have another code which is executed only if the above is true. When I press the save button and the value of my variable is false then a message popup and return to form. All is ok. After some tests I found out that after the validate popup message it run the code which is after the alert message. Bellow is my code.

  IF MEM:X = 0
     loc:invalid = 'MEM:X'
     p_web.SetValue('retryfield','UpdateMembri')
     loc:Alert = 'Please confirm !'
  END

! Here is the code  which run only if the MEM:X = 1
.....


It is ok if the validation faild,  to run the code which is after the validation?


Thank you for any advise.

Regards,
Robert

Alberto

  • Hero Member
  • *****
  • Posts: 1885
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: ValidateUpdate embed and Alert message
« Reply #1 on: July 28, 2010, 03:32:39 AM »
Robert,
You can have many validations and they are arrange in a cascede of validations, the user see the last validation in the cascade.
If you need yo check one validation first, then you need to place it last.
Hope this helps
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11302
    • View Profile
Re: ValidateUpdate embed and Alert message
« Reply #2 on: July 28, 2010, 10:48:09 AM »
yes, the idea is that if you have say 4 invalid fields on the form then all 4 display as invalid at the same time.
much better than showing the user 1, then they click save, then show them another one, and so on.

Of course immediate validation is much better.

cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: ValidateUpdate embed and Alert message
« Reply #3 on: July 28, 2010, 09:32:33 PM »
Ok, understand now. Also  there is any code to stop validation and return ?

Thank you all.
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11302
    • View Profile
Re: ValidateUpdate embed and Alert message
« Reply #4 on: July 30, 2010, 11:39:52 PM »
sure, just
EXIT
the routine

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: ValidateUpdate embed and Alert message
« Reply #5 on: July 31, 2010, 09:28:22 PM »
Thank you Bruce,
It works perfect.
Robert