Onboarding help

Jen11
Tera Expert

Hello, 

I need some help on the Onboarding.

On the initial form there are a few fields, whatever that is entered on the initial form I would like to 'pull that information across all other tickets to avoid re-entering.  For example the 'Delivery Address' from the initial form:

Jen11_0-1707262514268.png

 

I would like whaterver that is entered here to pull here :

 

Jen11_1-1707262601287.png

 

How can accomplish there? Thanks in advance for the help. 

2 REPLIES 2

BalaG
Kilo Sage

Hello @Jen11   one way to do this is to store the data entered on the initial form in the browser sessionStorage.

1. On initial form create a onChange script and store the data entered in browser sessionStorage. Here is an example that stores the description field

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }
        // save description as a key value pair - key -> 'init-description
	sessionStorage.setItem('init-description',  g_form.getValue('description'));
}

 

2. On the second form write a onLoad client script that reads value from. session storage and loads the value where you want to. This example loads it to a field named description on a completely different table.

 

function onLoad() {
   //Type appropriate comment here, and begin script below
	var desc = sessionStorage.getItem('init-descrption');
	if( desc !== null)
		g_form.setValue('description', desc);
	//alert(g_form.getValue(desc));
}

 

You can store the data in localStorage if you want the data to be available across tabs. But session is probably the best since it is tab specific and will expire with the. session.

 

Hope this helps

If this answer solved your issue please mark it as a solution or mark it 👍 helpful if it was of help.

--

Bala Guthy

 

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Jen11 

 

Greetings!!

 

So you want to copy Order Guide variable data to catalog item variable data.

https://www.servicenow.com/community/developer-forum/setting-values-of-catalog-variables-based-off-w...

https://www.servicenow.com/community/now-platform-forum/help-with-copying-variables-from-an-order-gu...

 

https://www.servicenow.com/community/itsm-forum/order-guide-how-to-copy-values-from-one-catalog-item...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************