This function emulates the PSHBTNFLD keyword by responding with a choice number.  The choice number is derived from the id of the button being pressed.  The screen is automatically submitted when this function is called.


  • field id - id of a hidden element bound to the PSHBTNFLD response field
  • button - reference to a button element that is being pressed


The following snippet of code would typically be assigned to the button's onclick event:

pui.setPSHBTNFLD("BUTTONS", this);