cancel
Showing results for 
Search instead for 
Did you mean: 

Personas: how to pass values from one screen to next screen?

Former Member
0 Kudos


Hi guys,

Here is the case:

On screen A, there is a text box to get the user's input. Say, user types in a number, 1234.

Then user press a script button so that UI moves to the next sceen B.

On screen B, there is another text box as input field. Now I want the value from screen A, ie, 1234, to be displayed in this text field when screen B is shown. Finally, user can directly press an action button to do something based on this value from screen B.

Question:

The value 1234 is input in screen A, how can this value be passed to screen B in the given field?

I see that on a single screen, one can use args.xx to store the variable in JS script. Would this variable also be visible in other screens using JS?

Thanks a lot!

Br,


Dong

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi,

Just add extra info for this question: please be aware that the different screens I am taking here are made in different flavours - meaning that I am asking how to pass variable values between flavours when calling "Switch flavour" in script. There is another way of having multiple screens by calling tcode, but that is not what I am asking here.

Br,


Dong

Former Member
0 Kudos

Hi,

Use the 'Copy value' and 'Paste value' actions in the script you are using to navigate from screen A to screen B

Former Member
0 Kudos

Hi Neil,

The copy/past does not work between screens. Here is what I did:

On screen A, I used a script button to "Copya value" into a var, "x", from a textbox.

Then on screen B, I added a script button, which "Paste value" of "x" to a textbox.

But no data is shown in the textbox.

Any idea?

Thx.

Dong

Former Member
0 Kudos

Yeah, you need to do the whole thing from the script on screen A... see below a quick example I knocked up which worked.

step 1 copies the value from the text field on screen A,

step 2 switches to the flavour (screen B)

step 3 pastes the value to the text field on screen B

Former Member
0 Kudos

Just one little thing: You have to add a "refresh screen" step, before you can copy values from a screen.

Cheers,

Christian

Former Member
0 Kudos

That's true, but this is actually the same screen not another screen. In this example the "screens" are actually different flavours of the same screen.

Former Member
0 Kudos

Hi Neil,

You are right. The key point is at your step 3: the ID has to be manually copied, but not by using the "selection icon" (ie the arrow icon). Thanks a lot!

Set your answer to correct!

Dong Zhu

Answers (1)

Answers (1)

Former Member
0 Kudos

Many thanks for all answerings.

Dong