on 02-14-2017 10:18 AM
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
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
Scenario:
> 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,
Thomas
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:
OnLoad:
var userID = session.findById("wnd[0]/usr/ctxtPersonas_152459447653923").text;
session.utils.put("user",userID);
session.findById("wnd[0]/usr/lblPersonas_152459451218351").text = "";
OnAfterRefresh:
var userID = session.utils.get("user");
var userF4 = session.findById("wnd[0]/usr/ctxtPersonas_152459447653923").text;
if (userID == userF4) {
return true;
}
session.utils.put("user",userF4);
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,
Cris
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.