Page 1 of 1

Auto-Populate fields based on Combo Box selection

Posted: Wed Jul 25, 2012 11:37 am
by clyons99
I'm having an issue trying to have the selection in a combo box control the auto populating of other (text box) fields on a screen. The combo box is populating successfully but nothing happens in the text box fields. I'm trying to use the java command get() but I don't seem to be retrieving the desired value.

I put the following code in the onselect event:
js: "TEJOBN = " + get("Combo1");

TEJOBN is the name of the database field I want to include in the Auto-complete data selection.

Re: Auto-Populate fields based on Combo Box selection

Posted: Fri Jul 27, 2012 6:35 pm
by Alex
The onselect event already expects JavaScript, so there is no need to use js: here.

One way to accomplish what you are trying to do is to pass control back to the RPG and have the RPG code build the Auto-complete criteria into a variable which you can bind to the "selection criteria" property.

To pass control back to the RPG code, simply use the following in the onselect event:
pui.click()