Skip to Content

Personas handling popups and multi transaction scripting


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...

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.findById("wnd[0]/usr/ctxtCN_PROJN-LOW").text = project;
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?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 20, 2017 at 03:13 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded