cancel
Showing results for 
Search instead for 
Did you mean: 

Personas handling popups and multi transaction scripting

smith_john
Active Participant
0 Kudos

Hi,

Got a little issue I need help with...

I have a multi transaction scenario in which I need to handle a popup which is not always present.. Transactions such as CN41N use a logical database to manage the selection screen, and when you first access the transaction in that particular session you are presented with a popup to choose a database profile ... see below;

The second time you access the transaction you won't see this as it's been cached.

In my scenario, I'm starting in one transaction, copying some values from a few fields, then opening this transaction and trying to paste the values... this fails because this popup is present.

I've tried to handle the popup with an onload script which works fine if you runt he transaction directly, but if I call the transaction from my script it fails...

//variables
var project = session.findById("wnd[0]/usr/cmbGV_PSPID_CAM").text;
var appr_bl = session.findById("wnd[0]/usr/txtGV_PLVERSN_APP").text;

//Run Report and enter defaults

session.callTransaction("cn41n");		
session.utils.changeFlavor("005056A02C471ED795B72A3107585566");
session.findById("wnd[0]/usr/ctxtCN_PROJN-LOW").text = project;
session.findById("wnd[0]").sendVKey(0);
session.findById("wnd[0]/usr/ctxtP_PLVSN").text = appr_bl;

the script fails with this line ...

session.findById("wnd[0]/usr/ctxtCN_PROJN-LOW").text = project;

It's failing because the control isn't yet visible on the screen, as the popup is present.

It's almost like Personas isn't firing the onload script of the popup whilst the first script is running.

Any clues on how to solve this?

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

smith_john
Active Participant
0 Kudos

answering my own question ... 🙂

In this scenario, the onload for the popup is kinda pointless.

I used the if (session.idExists"... to manage the popup.

Answers (0)