Skip to Content

Screen Personas - Event that fires after F4 help selection

Feb 14, 2017 at 10:18 AM


avatar image

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


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Cristiano Hansen
Mar 30 at 10:00 PM

Hi Thomas,

Have you checked this blog?
And this wiki?

Kind regards,

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Cristiano,

Thx for answering to my long time ago question.

My problem was not to create a code triggered F4 Help pop-up.
I wanted to do some coding after the manual selection of an F4 help pop-up value:

> klick any F4 Help
> select any value with double click
> after the value is taken over to the main Screen i want to do an automatic scripting.

I think at that time i have done this in two steps (double click the value and then press a scripting button)

best regards,



Hi Thomas,

I'll have a look at this scenario during the week.

I'll come back to you until Friday.

Kind regards,



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,