Re: I4GL 4.10 input Array Annoyance
Posted in 1995
Mark.Denham@bbc.co.uk (Mark Denham) wrote: >Try defining the fields in the form as formonly, without any constraints on >them. Do all the necessary validation (not null, ranges etc) >programatically. I was afraid you were going to say that. Just as I get my syscolval/att clean and manageable, I find I can't use it thanks to another Informix feature. I've used the formonly tactic for selection windows, but I really wanted to avoid it for database fields. >Do any complete row checking (for blank rows) in the after row and after >input statements. You will also need to put the INPUT ARRAY inside a WHILE >loop if you want to prevent them leaving a row if the after row checks throw >up a problem. You will also need a NO ENTRY field, defined as the last one >in the row, that you can use to force input array to skip to next row. >Skeleton code below: > >LET exit_input = FALSE >LET curr_row = 1 >WHILE NOT exit_input > > INPUT ARRAY > BEFORE ROW > IF( curr_row > arr_curr() ) THEN > NEXT FIELD no_entry_field > END IF > LET curr_row = arr_curr() > > AFTER INPUT ^^^^^ | After ROW you mean? :-) Yes, I am aware of this construct, and in fact, it is already set up that way in my generated code. I guess my real concern is duplicating all that validation code throughout my applications. That's why I was using the syscolval and syscolatt--so I would have one place to make changes, then apply them with a quick form compile of all my applications. Am I SOL here? Mike