Combo Box Onchange Extended properties?


I have a combo box, and whenever its value is changed, another field in the screen needs to be updated.

For instance, the combo box has card numbers and when I choose a card number, the field Status must be filled up with the rigth value that is stored in the database.

How can I do this? Using Extended Properties? But how?


Ana Tavares
Hello Ana,

Try doing this.
1 - Add to your page a button associated with an empty action.
2 - Set, in the extended properties, for the style the following "display: none;"
3 - Also set a name for the button (eg: Button).
4 - On your combo box set, in the extended properties, the onchange to "document.getElementById('" + Button.Id + "').click();"

Now when you change the value of the combo box the screen action associated with the button will be invoked and the preparation of the page will also be invoked so you can program the logic necessary to update the status.

It worked just fine.

Thanks André.

Ana Tavares

i tried and it is not working for me. do you have any sample (.oml)?

Since 4.2, you can now use the OnChange property of the ComboBox instead of the onchange extended property. Specify a screen action in that property, and then in that action use the AjaxRefresh tool to refresh the parts of the screen you need. Please note that in this case the preparation is not called again because it's an Ajax request.

Best Regards,
Gustavo Guerra