cherokee
11th January 2011, 17:43
Hello everyone,
In the check.input of field tdsls989.poli I am zooming to to populate a field tdsls989.srnb value which I want this be automatic once tdsls989.poli has a value other than 0. This works fine but, when I click the save button, the check.input: section is performed again and it zooms again to get value tdsls989.srnb again.
How can I avoid the second zoom when clicking on save?
field.tdsls989.poli:
check.input:
if tdsls989.poli <> 0 and not check.for.component(tdsls989.sitm,tdsls989.po,tdsls989.poli) then
tdsls989.poli = 0
message("Invalid Purchase Order Line",0)
set.input.error("")
else
if tdsls989.poli <> 0 and licence.quantity.exceed(tdsls989.sitm, tdsls989.po,
tdsls989.poli, tdsls989.cuno,tdsls989.cdel) then
message("Licence Quantity Exceeded",0)
set.input.error("")
endif
endif
if tdsls989.poli <> 0 then
t.srnb = lval(zoom.to$("tdpurc111m000",Z.SESSION,"tdsls989.poli","tdpur987.srnb",0))
if not read.licence (tdsls989.po,tdsls989.poli,t.srnb) or
tdsls989.cuno <> tdpur987.cuno or tdsls989.cdel <> tdpur987.cdel then
message("Invalid Licence",0)
t.srnb = 0
set.input.error("")
endif
endif
after.input:
if t.srnb <> 0 then
do.occ(actual.occ,update.srnb, t.srnb)
endif
Thanks in advance.
In the check.input of field tdsls989.poli I am zooming to to populate a field tdsls989.srnb value which I want this be automatic once tdsls989.poli has a value other than 0. This works fine but, when I click the save button, the check.input: section is performed again and it zooms again to get value tdsls989.srnb again.
How can I avoid the second zoom when clicking on save?
field.tdsls989.poli:
check.input:
if tdsls989.poli <> 0 and not check.for.component(tdsls989.sitm,tdsls989.po,tdsls989.poli) then
tdsls989.poli = 0
message("Invalid Purchase Order Line",0)
set.input.error("")
else
if tdsls989.poli <> 0 and licence.quantity.exceed(tdsls989.sitm, tdsls989.po,
tdsls989.poli, tdsls989.cuno,tdsls989.cdel) then
message("Licence Quantity Exceeded",0)
set.input.error("")
endif
endif
if tdsls989.poli <> 0 then
t.srnb = lval(zoom.to$("tdpurc111m000",Z.SESSION,"tdsls989.poli","tdpur987.srnb",0))
if not read.licence (tdsls989.po,tdsls989.poli,t.srnb) or
tdsls989.cuno <> tdpur987.cuno or tdsls989.cdel <> tdpur987.cdel then
message("Invalid Licence",0)
t.srnb = 0
set.input.error("")
endif
endif
after.input:
if t.srnb <> 0 then
do.occ(actual.occ,update.srnb, t.srnb)
endif
Thanks in advance.