[
|../../index.htm#lansa/ugubc_c10525.htm]
You are here:
DEFINE FIELD(#PAYTERM) TYPE(*CHAR) LENGTH(1)
INPUT_ATR(DDPT)
USE BUILTIN(DROP_DD_VALUES) WITH_ARGS(DDPT)
USE BUILTIN(ADD_DD_VALUES) WITH_ARGS(DDPT '''/'''
'A/B/C/D/E') TO_GET(#RETCD)
BEGIN_LOOP
REQUEST FIELDS((#PAYTERM))
END_LOOP
A better solution would be to load the valid field codes and descriptions into the drop-down list using a different field. The code field then overlays the new field in the position that the code appears. So when the entry in the drop-down list is selected the code field is automatically updated with the code from the drop-down entry because of the overlay.
DEFINE FIELD(#PAYDROP) TYPE(*CHAR) LENGTH(24)
INPUT_ATR(DDPT)
DEFINE FIELD(#PAYTERM) TYPE(*CHAR) LENGTH(1)
TO_OVERLAY(#PAYDROP 1 )
USE BUILTIN(DROP_DD_VALUES) WITH_ARGS(DDPT)
USE BUILTIN(ADD_DD_VALUES) WITH_ARGS(DDPT *DFT
'A - PAYMENT WITH ORDER') TO_GET(#RETCD)
USE BUILTIN(ADD_DD_VALUES) WITH_ARGS(DDPT *DFT
'B - CASH ON DELIVERY') TO_GET(#RETCD)
USE BUILTIN(ADD_DD_VALUES) WITH_ARGS(DDST *DFT
'C - 7 DAYS') TO_GET(#RETCD)
USE BUILTIN(ADD_DD_VALUES) WITH_ARGS(DDST *DFT
'D - 30 DAYS') TO_GET(#RETCD)
USE BUILTIN(ADD_DD_VALUES) WITH_ARGS(DDST *DFT
'E - UNLIMITED') TO_GET(#RETCD)
BEGIN_LOOP
REQUEST FIELDS((#PAYDROP))
END_LOOP
[
|../../index.htm#lansa/ugubc_c10525.htm]