Storing data from web in a variable, and use same data as input within the same script?

How can we save a dynamic data from web in a variable and use the variable as input in same script.

Example:After registration, i want to save registration number in a variable, and use same data as input in same script to login again.

Can we do that ?
-please suggest a way in normal scripting not in code type thing.

Also please note, we cant give delay command and type manually , as they belong to different screens.

Kindly suggest accordingly.

as i wrote in other thread

def x = WebUI.getText(ElementYouWant)WebUI.setText(OtherObject, x)

Thanks for prompt response, but i was trying to give a variable in the captured script, i was unable to find the global variable (X)option in the tool as mentioned

Pleas find below reference from my screen

$1913B9589218A381.jpg

$6FD09756CE1D0E30.jpg

where exactly can i find this option(Global Variable) in the tool…?

let me explain i am try to capture a text from web and store it in global variable say X, which i will be using as input to another field which is in same script.

Please tell me if this is possible or not?

for Katalon 5.4 and above read this
https://docs.katalon.com/pages/viewpage.action?pageId=13697476

Are you just looking to see how to set, then use a Global Variable, such as?
GlobalVariable.fullName=“Katalon Studio”
WebUI.setText(path_to_object, GlobalVariable.fullName)

As mentioned, you would set up the Global Variable to use as part of the profile, then call it in the script when needed.