Page 1 of 1
How to enforce all Validations
Posted: Fri Mar 24, 2006 6:45 am
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.
Posted: Fri Mar 24, 2006 7:21 am
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
Posted: Fri Mar 24, 2006 7:35 am
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
Posted: Tue Mar 28, 2006 10:14 am
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.
Posted: Tue Mar 28, 2006 1:59 pm
by Antonio Linares
local lOk := .t.
AEval( oDlg:aControls, {| j | lOk := lOk .and. If( j:bValid == nil, .t., Eval( j:bValid ) ) } )