- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 02:28 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 03:49 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 02:43 AM
so you want to pass category value to some variable on that catalog item?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 02:49 AM
@Ankur Bawiskar I want to define the value from the choices in the select box variable, then I want to pass values from Incident for catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 02:53 AM
so the select box should show choices from category field on incident form?
OR
Can you explain your question with some screenshots?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 03:39 AM - edited 04-17-2023 03:41 AM
The select box is on the catalog item - I want to define the value if the form is opened from the UI action on incident
Then I want to populate some of the fields below from the fields on incident