Using Keyfunction in .Net

Sre

New Member
I have a frame with several fields in update.
When I setup one field, I want to initialize an other field of the frame (in the same update).

I use this code but it doesn't work in .net version (ok in character version).

....
update
v_desc_op
v_wkctr
v_setup
v_setup_men
v_wkctr1
v_batch
v_men_mch
v_freq
v_start
v_end
v_cmtindx
with frame b editing:
if frame-field = "v_wkctr" then do:
readkey.
apply lastkey.
if keyfunction(lastkey) = "RETURN" or
keyfunction(lastkey) = "GO" or
keyfunction(lastkey) = "TAB" then do:
/* Dans le cas de la création d'une op, init de % fréquentiel par */
/* celui du centre de charge saisi (wc__dec01) */
find first ro_det where ro_domain = global_domain and ro_routing = route
and ro_op = v_operation and ro_start = v_date_debut no-lock no-error.
if not available ro_det then do:
find first wc_mstr where wc_domain = global_domain
and wc_wkctr = input v_wkctr
no-lock no-error.
assign
v_freq = if available wc_mstr then wc__dec01
else 100.

display
v_freq
with frame b.
end.
end.
end.
else do:
readkey.
apply lastkey.
end.
end.
....

Somebody can help me ?

Thanks
 
Top