You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Every [<span style="color: #0000ee"><span style="text-decoration: underline; ">Destination Screen</span></span>] has an invoke script which controls how it is displayed. Here is an example of a script that invokes a SHOWORDER screen when an order is selected in the instance list:

First the script navigates to the 5250 junction screen GETORDER which is used to select which order is to be shown:
 
NAVIGATE_TO_JUNCTION("GETORDER");
 
It then makes sure that we get to the GETORDER screen. If this check fails an error message is shown:
 
if ( !(CHECK_CURRENT_FORM("GETORDER", "Unable to navigate to form GETORDER")) ) return;
 
Next the script retrieves the current order number from the instance list to the GETORDER screen. Typically you need to edit this part of the script (see [<span style="color: #0000ee"><span style="text-decoration: underline; ">Replacing Hardcoded Employee Number with Current Instance List Entry</span></span>]):
 
SETVALUE("ORDERNUMBER", objListManager.AKey1[0] );
 
And then presses the Enter key to process the GETORDER screen:
 
SENDKEY(KeyEnter);
 
Finally the script makes sure that screen SHOWORDER has arrived back from the IBM i and is ready to be displayed. If this check fails, an error message is shown:
 
if ( !(CHECK_CURRENT_FORM("SHOWORDER", "Unable to display order number " + objListManager.AKey1[0] )) ) return;
 
 
Also See:
[<span style="color: #0000ee"><span style="text-decoration: underline; ">NAVIGATE_TO_JUNCTION Function</span></span>]
[<span style="color: #0000ee"><span style="text-decoration: underline; ">CHECK_CURRENT_FORM Function</span></span>]
[<span style="color: #0000ee"><span style="text-decoration: underline; ">SETVALUE Function</span></span>]
[<span style="color: #0000ee"><span style="text-decoration: underline; ">SENDKEY Function</span></span>]
 

  • No labels