Skip to Content

Screen Personas - Event that fires after F4 help selection

Is there a way to do some script action after a F4 help value was selected?
In many usecases you have to select a value with the F4 search help and then continue to the next screen with a button or the Enter Vkey.
I will implement this in one step.

With the onAfterRefresh - event it does not work properly.

Best regards


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 30, 2018 at 10:00 PM

    Hi Thomas,

    Have you checked this blog?
    And this wiki?

    Kind regards,

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Thomas,

      I think I got it. Let me explain what I did.

      1) Put a F4 Help Text Field and a Label in a new flavor. The F4 Help Text Field was linked to SUID_ST_BNAME table, BNAME field. The Label is meant to hold a text after I double click an item from the search help.

      2) I wrote 2 scripts, for OnLoad and OnAfterRefresh screen events.

      The scripts:


      var userID = session.findById("wnd[0]/usr/ctxtPersonas_152459447653923").text;
      session.findById("wnd[0]/usr/lblPersonas_152459451218351").text = "";


      var userID = session.utils.get("user");
      var userF4 = session.findById("wnd[0]/usr/ctxtPersonas_152459447653923").text;

      if (userID == userF4) {
      return true;

      session.findById("wnd[0]/usr/lblPersonas_152459451218351").text = userF4;

      As you can see, when the screen is loaded, I get the text from the F4 Help Text Field and keep in memory. The label text is cleared.

      When I use the search help and double click an element, the second script comes into action: I get the previous value, from memory, and compare with the actual result, already written in the field. If they are equal, I do nothing, otherwise I store the new value and display it in the label.

      Is this something you already tried? Does it fit your needs?

      Kind regards,