4GL required keyword
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi! Should YES, but as you can see - does not. You will have to use AFTER INPUT to check all fields. Also "required" in arrays tends to get stuck in a row that you don't really want. HTH Michael steve farris wrote: > Hello, > > I'm trying to use the "required" keyword to insure that a user fills out > all necessary parts of a form when entering data. However, they are able > to hit escape before entering all information which causes a improper > null value crashing the update. > I am using something like: > > entry.per: > ====== > > database test_regs > screen size 24 by 80 > { > State [a0] Number [f000 ] Calendar Year [cy ] > } > > tables > regs_actions > attributes > a0 = regs_actions.state,upshift,required; > f000 = regs_actions.number,required; > cy = regs_actions.calendar_year, upshift, required; > > end > > Shouldn't the required cause the form to inform the use that they MUST > enter a value in these fields?? > > Thanks! > -- > steve farris > nylon fusion guitar site at http://www.mindspring.com/~nlymbo
you do have 'on key(esc)' if ... end if to help deal with the problem. in any case, even if 'required' keyword is used, you still have to deal with the user typing something in then backspacing to nothing. so whatever validation you are using you could include, in perhaps, a subroutine, called either by the on key as above,or in other places in your code. steve farris wrote: > Hello, > > I'm trying to use the "required" keyword to insure that a user fills out > all necessary parts of a form when entering data. However, they are able > to hit escape before entering all information which causes a improper > null value crashing the update. > I am using something like: > > entry.per: > ====== > > database test_regs > screen size 24 by 80 > { > State [a0] Number [f000 ] Calendar Year [cy ] > } > > tables > regs_actions > attributes > a0 = regs_actions.state,upshift,required; > f000 = regs_actions.number,required; > cy = regs_actions.calendar_year, upshift, required; > > end > > Shouldn't the required cause the form to inform the use that they MUST > enter a value in these fields?? > > Thanks! > -- > steve farris > nylon fusion guitar site at http://www.mindspring.com/~nlymbo
Hello, I'm trying to use the "required" keyword to insure that a user fills out all necessary parts of a form when entering data. However, they are able to hit escape before entering all information which causes a improper null value crashing the update. I am using something like: entry.per: ====== database test_regs screen size 24 by 80 { State [a0] Number [f000 ] Calendar Year [cy ] } tables regs_actions attributes a0 = regs_actions.state,upshift,required; f000 = regs_actions.number,required; cy = regs_actions.calendar_year, upshift, required; end Shouldn't the required cause the form to inform the use that they MUST enter a value in these fields?? Thanks! -- steve farris nylon fusion guitar site at http://www.mindspring.com/~nlymbo