Wednesday, May 29, 2013

How do dynamically populate a valcode values for dropdown menu in Web UI or Webadvisor


First, add DYNAMIC.VALCODE.ID to the form

Second, put this in FIELD.ACCEPT of DYNAMIC.VALCODE.ID

* Note: Populate XL.INTERNAL.CODE, XL.DESCRIPTION with the codes and descriptions of the dropdown values first
X.WEB.VALCODE.NUMBER = "PHAM.TEST.CODE"  ß (Notice this has to be the same name as $CR.PHAM.TEST.CODE below)
X.WEB.VALCODE.KEY = ""
CALL S.STORE.DYNAMIC.VALCODES(X.WEB.VALCODE.NUMBER, XL.INTERNAL.CODE, XL.DESCRIPTION,"","",X.WEB.VALCODE.KEY,"","")
INPUT.DATA = X.WEB.VALCODE.KEY


Third, put this in the validation field of the dropdown field.

$CR.PHAM.TEST.CODE;DYNAMIC.VALCODE;DYNAMIC.VALCODES.ID;DYNAMIC.VALCODES.CODES;DYNAMIC.VALCODES.DESCS;DYNAMIC.VALCODES.FLD3;DYNAMIC.VALCODES.FLD4



This subroutine could be useful to modify existing valtable:
S.GET.VALCODE.RECORD

No comments:

Post a Comment