How to enforce all Validations

Post Reply
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

How to enforce all Validations

Post by Milan Mehta »

Hello All,

I have few Redefine Get with Valid clause on a Dialog. User can directly click on Ok button and skip all the valid clause ?

How can I prevent this ?

TIA
Milan.
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

Hi Mr.Mehta

Do not use CANCEL clause with the BUTTON if you want all gets to be validated and vice-versa in case GETs are not be validated, when any
BUTTON is pressed/clicked.

- Ramesh Babu P
Frank Demont
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Post by Frank Demont »

You can make a construction as :

LOKAL lok := .T.
Aeval(oDlg:aControls,{|j|lok := lok .AND. EVAL(j:bValid)})

IF lOk is .F. , at least one valid clausule hes returned .F.

Frank
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Post by Milan Mehta »

Frank Demont wrote:You can make a construction as :

LOKAL lok := .T.
Aeval(oDlg:aControls,{|j|lok := lok .AND. EVAL(j:bValid)})

IF lOk is .F. , at least one valid clausule hes returned .F.

Frank
Dear Frank,

No it does not work. It gives me error at Eval().

Can you guide me further. I am using Nov-05 build.

Witb best regards,

Milan.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

local lOk := .t.

AEval( oDlg:aControls, {| j | lOk := lOk .and. If( j:bValid == nil, .t., Eval( j:bValid ) ) } )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply