I created a window (not a Data Window) in PB10, and on it are 20 edit mask objects, named em_value1 through em_value20. Upon the user clicking a Submit button (on the same window) I would like to step through each edit mask object to validate the data that the user input.
Is there a way to refer to each field by using a variable that increments its value 1 through 20? I'd prefer not to have to use 20 separate IF statement blocks.
Below is an example of what I would like to accomplish. I know its syntax is completely invalid, but maybe it will illustrate what I want to do.
INT l_fieldno
FOR l_fieldno = 1 TO 19
IF em_value{l_fieldno} > em_value{l_fieldno + 1} THEN
MessageBox('Error','Input value for row ' + STRING(l_fieldno + 1) + ' must be greater than the preceeding value.', StopSign!)
NEXT
Thanks for any assistance you can offer!
Is there a way to refer to each field by using a variable that increments its value 1 through 20? I'd prefer not to have to use 20 separate IF statement blocks.
Below is an example of what I would like to accomplish. I know its syntax is completely invalid, but maybe it will illustrate what I want to do.
INT l_fieldno
FOR l_fieldno = 1 TO 19
IF em_value{l_fieldno} > em_value{l_fieldno + 1} THEN
MessageBox('Error','Input value for row ' + STRING(l_fieldno + 1) + ' must be greater than the preceeding value.', StopSign!)
NEXT
Thanks for any assistance you can offer!