cancel
Showing results for 
Search instead for 
Did you mean: 

How do you deal with variable screen flow in a Personas script?

Former Member
0 Kudos

There are many occasions where the screen flow through a transaction varies for a number of reasons. One situation that seems like it might affect Personas scripts quite often is where a transaction asks for extra information the first time you run it after login, but remembers that subsequently, at least until you logout and back in. My particular example today is transaction ME2J - Purchasing Documents per Project. The first time you run this is asks for a database profile, and subsequently does not.

How, in a Personas script, can you detect this extra pop-up and fill in the necessary information when asked for, but carry on anyway if the pop-up doesn't appear? I don't immediately see a way to detect the presence or absence of this pop-up.

Accepted Solutions (1)

Accepted Solutions (1)

former_member194736
Participant
0 Kudos

Hello Steve -

I have used an if condition to check for any screen element that exists on the pop up, for cases where a pop up may appear and I need to fill in values.

For instance, in the screenshot below, I am checking if a label value on a popup is not empty, before filling in a value in a text field.

This should work for detecting presence of a popup and performing the right actions if thats the case.

Hope this helps

Thanks

Vandana

Former Member
0 Kudos

Here's my example. As you can see I'm running ME2J to get a report of purchase orders for a project. I have the project code in a field on the logon screen and I'll paste it into the selection screen of ME2J and execute. However, the first time you run ME2J in each login session it asks you for a "database profile" - that's always the same value for us so I've hardwired it into the script. Subsequently, when you run ME2J it doesn't ask. Following your example I've done this:

I check that the label for the DB profile field is not empty, and if not I fill in the value. Now on the subsequent invocations of ME2J it happily deals with the lack of the pop-up and doesn't try to execute step 5. However, first time through the "IF" still doesn't fire and step 5 still doesn't get executed.

I must be missing something, but what?

Steve.

TobiasQueck
Advisor
Advisor
0 Kudos

Hi Steve,

You need to put a "Refresh Screen" right before the IF, otherwise, your script looks perfectly fine.

Cheers,
Tobias.

Former Member
0 Kudos

Thanks Tobias - the "Refresh Screen" did the trick.

Steve.

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks again Steve ... this is my first project with Personas, I've only had it installed on my test server a week so I'm a totoal noobie

I've attached the script.

It may help if I explain what my intentions are with this transaction... I want to create a single screen transction for creating equipment records. I have merged fields from the various tabs on the main screen and then I have created some text boxes which I want to copy/paste their values into other screens of the equipment record with a script ... I am using one your your ideas for this in that I have replaced the transaction save button with a script button, this script attempts to populate data in the partner screen and the class screen and then save the transaction, effectively merging data from 3 screens into 1.

Hope this makes sense.

Neil

Former Member
0 Kudos

I understand what you're trying to achieve, and it makes a whole lot of sense. And I like that you're stealing my ideas .

I've imported your script into my system and added it to a flavor of IE01 and I'm sorry to report that it seems to work for me. At least, steps 12 and 13 work properly. It fails further down due to differences in our system config, but that's not Personas' fault. I'll try to sort those out to check out the rest of the script but it seems to me that your script is correct and there's an Personas issue stopping it from working. You might consider creating an OSS message about this one.

Steve.

Former Member
0 Kudos

it seems to fail in both events, that is... when I log on and access the transaction the first time (the popup appears and the double-click doesn't happen when it should) ... then i execute it again and this time i expect the popup should not appear, it seems to not be able to get to the next step after the if statement where it should populate the class name in the class field.

appreciate your help Steve

Former Member
0 Kudos

Can you export your script to a text file and attach it to a comment here (switch to the advanced editor to attach). I'll look at it in my system and see how it works here. We have SM configured so i can create equipment

Steve.

Former Member
0 Kudos

thanks Steve,

I wondered how an If statement was indented... handy tip

Seems I have got the script to move on, but only by one step, it still fails though.

I've deleted step 13 which was the focus step and indented (the new) step 13.

It now fails at step 13...

Former Member
0 Kudos

How does step 13 fail? Does it fail to choose a class type when the pop-up appears (the double-click doesn't happen when it should) or does it try to choose one when the pop-up doesn't appear (the double-click happens when it shouldn't?

If the second, then I've had that before and the problem has been cured by patches from OSS notes. I would make sure you're up to date with all patches - there have been some OSS notes in the last week or so - and try again.

Steve.

Former Member
0 Kudos

Hi,

I have been creating a script where I need to handle a popup, its for IE01 where the script handles navigation to the class overview. Upon first access to the screen a popup appears to select the class type, but subsequent access to the screen does not produce the popup.

I've tried to follow this method but it's not working. Pleasee my script below, can you point out where I'm going wrong?

thanks.

Former Member
0 Kudos

I assume some of the actions from 13 onwards are meant to happen only if the IF condition is true? At the moment they aren't controlled by the if - they would be indented if they were. See the screenshot in one of my comments above.

To do this, select each one, starting with 13, and click the "Up" button just above the script actions. That will move it into the body of the IF. You need to do this for each action that needs to only execute if the IF condition is true.

By the way, generally you don't need "Focus" actions. They are put there by the recording process but they can be deleted in most cases. The only time you need them is if you are using an "Press Enter" action and its behaviour depends on which input field the cursor is in - then you need a "Focus" action.

Steve.