Create Variable With Keyboard and Copy the instruction and the variable

I am programing a URCAP in what i use a JTextField to insert a value. When a push the JtextField i display the keyboard to insert the value for jtextfield and using the example of Cycle Counter Swing it creates a variable that i use to share the value of the jtextfield with another aplication.

The problem that i have is that when i copy the instrucction and i paste below in the robot program, if a i want to use the same value in the jtextfield i dont need to text this value again, then i dont use the keyboard and the new variable is not created.

Anybody knows how to create the variable without using the keyboard? I have tried to create the variable in the openView() but it doenst work.

Thank you for any clue

Can you show the code where you have implemented the variable creation?
Also, you can look at this post or other similar posts in the forum and see if it helps.