- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:07 PM - edited 10-27-2023 12:09 PM
Hi everyone ,
im trying to pass values from one form to another using a UI action in the context menu, but all of the related fields are not being populated only the strings , is there a way to do this ?
here is the code
var urlStart = '/rm_story.do?sysparm_stack=rm_story.do&sys_id=-1&sysparm_query=';
var url = urlStart + 'u_related_requested_item=' + current.number
+ '^description =' + 'ServiceNow Platform'
action.setRedirectURL(url);
thanks a lot
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:51 PM
I believe the Display vlaue for product table is number. Try passing number corresponding to the 'SerivceNow Platform' product and it should work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:27 PM
In that case current.program will suffice considering the display value is set. In other words, you need to pass the value that is the display value for the table.
However, current.program.sys_id should work as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:30 PM - edited 10-27-2023 12:30 PM
var urlStart = '/rm_story.do?sysparm_stack=rm_story.do&sys_id=-1&sysparm_query=';
var url = urlStart + 'u_related_requested_item=' + current.sys_id
+ '^product =' + 'ServiceNow Platform'
action.setRedirectURL(url);
im doing it this way , is plain text only

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:31 PM
Unsure, if I understand. Does it work or it does not? Or something else is the expectation altogether?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:33 PM
for the Sys_id it works fine, that field product is another related field that should be populated with the string "Servicenow Platform" , but it's not achieving it

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:35 PM
What is the Type for product field? Is it a reference or string or some other field type?