Re: Question about default date in forms
Posted in 1996
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. > Since you're usig 4GL, I would suggest putting that sort of thing in the 4gl code rather than the form: LET m_table.datecol = TODAY + 7 WHILE is_holiday(m_table.datecol) LET m_table.datecol = m_table.datecol + 1 END WHILE INPUT BY NAME m_table.* WITHOUT DEFAULTS The is_holiday() function is left as an exercise for the student. It should return FALSE if the date passed to it is not on the weekend, and not in the holiday table of the database that establishes holidays. //////////////// ======================================================= ////////// // Dennis J. Pimple Informix Software, Inc. ////// / /// Principal Consultant 5299 DTC Blvd Suite 740 ///// // //// dennisp@informix.com Englewood CO 80111 //// // ///// /// // ////// recept: 303-850-0210 // // /////// direct: 303-740-5611 Opinions expressed are mine, / /////////// fax: 303-843-6408 and do not necessarily //////////////// http://www.informix.com reflect those of my employer