Re: 4GL INPUT statement problem
Posted in 1997
Daniel Wright wrote: > > We have an input statement in which we want to prevent modifications to > certain rows (based upon the value of one of its fields), but we still > must display them all (and we cannot re-order it to put unmodifiable > rows at the bottom). > > I am able to skip a row when the user is scrolling down, BUT when they > scroll up, I can't seem to skip the unmodifiable row. > > Is this impossible? > Do I really have to let them into an unmodifiable row and give an error > message when they do try to modify it? > > (I know you can determine the direction of scrolling with fgl_lastkey(), > but the problem is there is no way to specify that I want to put them on > a field in the row above where they're at now.) > > Thanks in advance, > - Dan Wright > #include <StdDisclaimers.h> Dan, there is no way do dynamically change the attribute of fields to "noentry"; this is a feature I asked for many years ago. So you cannot prevent the user from changing a row during INPUT ARRAY. However you can pull this schtick: before row copy row[array_cur()] to an identical record variable if (conditions) then message "Please do not change this row" end if after row if (conditions) and row[array_cur()] does not match the copy then error "You &^%$! I told not to change anything!" copy row[array_cur()] back from the identical record variable display row[array_cur()] to s_row[scr_line()] end if Now the user sees the change undone and knows why. -- -- Jake (Eschewing sesquepedelian obfuscation) . . _..-'( )`-.._ ./'. '||\\\\. }\\_/{ .//||` .`\\. ./'.|'.'||||\\\\|.. )o o( ..|//||||`.`|.`\\. ./'..|'.|| |||||\\`````` \\,@,/ ''''''/||||| ||.`|..`\\. ./'.||'.|||| ||||||||||||. ||| .|||||||||||| ||||.`||.`\\. /'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\\ '.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.` '.||| ||||||||| |/' ``\\||`` | ''||/'' `\\| ||||||||| |||.` |/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\| V V V }' `\\ /' `{ V V V \\ \\ \\ V / / / +-----------------------------------------------------------+ | Impeccable Logic: A thought process which successfully | | resists chicken bites | +-----------------------------------------------------------+