Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Populating variables in Choice List

ray evans
Tera Guru

I have a UI action on the Incident form which redirects to a catalog item form for creating a new request, which links back to the incident. I want to be able to populate some of the variables on the form using an onLoad UI client script,  the first being a select box on the catalog item, and also some values from the incident.

 

I have tried g_form.setValue('what_do_you_want_to_do', 'swap_asset'); but it isn't populating the variable

 

 

1 ACCEPTED SOLUTION

@ray evans 

then check this link which talks how you can send value over URL as parameter and then retrieve it on catalog form

3 Ways to Populate Values in ServiceNow via the URL 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

7 REPLIES 7

@ray evans 

then check this link which talks how you can send value over URL as parameter and then retrieve it on catalog form

3 Ways to Populate Values in ServiceNow via the URL 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Thanks, will try this and update on progress 

@Ankur Bawiskar Worked a treat, thanks. Now how can I wrap inside a condition that the client script only applies if the catalog item has been opened from the incident?