novicebaan
11th August 2003, 14:09
hi all,

I have created a form field of depth 5 . Now i have to check that
field of depth should not be null
the code which i have written is

fieldname:
check.input:

for i = 1 to 5 step 1
if tablename.try(1,i)=null then
message("should not null")
endif
endfor
It is checking at the first depth for all
pl advice how solve this

bye

RobertB
11th August 2003, 15:19
I don't know if this will help, but try reading the array field into an array variable, then step through the array variable.


domain some.domain my.array(5)

fieldname:
check.input:

my.array = tablename.try

for i = 1 to 5 step 1
if my.array(1,i)=null then
message("should not null")
endif
endfor


RB

jaapzwaan
11th August 2003, 15:21
For array fields, the predefined variable attr.element is set. Please check here: Programmer's Manual - predefined variables (http://www.baanboard.com/programmers_manual_baanerp_help_misc_predefined_variables)

NPRao
11th August 2003, 20:20
Here is a sample code-

field.path:
check.input:
path(1, attr.element) = strip$(path(1, attr.element))
if not isspace(path(1, attr.element)) and
not check.curr.path(path(1, attr.element), attr.element) then
set.input.error("zmadms0007")
|* path not found
endif