Re: Question about default date in forms
Posted in 1996
louislam@iastate.edu (Louis C Lam) wrote: :Hi. :I have a 4GL Form with a field to fill in a date, but I would like :it to automatically enter a default value of TODAY + 7 (a week from :today). The date may also need to be modified if TODAY +7 happens :to be a holiday. :I tried : Database formonly : screen : { : // form is here : } : attributes : day1 = formonly.day1 type date, : default = TODAY + 7; : end :but it gives me an error. If I just use "default = TODAY" it works just :fine. :There's gotta be a way to do this, right? Yes. Set your default in your 4GL code before you enter the input statement, and use without defaults in that statement. We have allways done this exactly because we needed much more advanced defaults than the form level default could do (including such things as database content and language dependent defaults). It's hardly any more work to put the defaults in the 4GL source than in the form source. Nils.Myklebust@idg.no <- New E-mail adress NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company