The CreatorCon Call for Content is officially open! Get started here.

How to use variables in the Processing script of UI Page

Shirley7
Tera Contributor

Hello, Guys
I'd like to know that, how I would get the value if the id of an element in HTML is the style of variables.

Shirley7_0-1706524483121.png

 

1 ACCEPTED SOLUTION

Chris McDevitt
ServiceNow Employee
ServiceNow Employee

Hi,

Here is an example:

/*
XML & Jelly Example from:
UI Action: Bulk Edit
UI Page:
sn_vul_BulkVulnUpdateDialog
*/
//UI Page
<g:ui_reference name="vi_assignment_group" id="vi_assignment_group" table="sys_user_group"
 
//Client Script may process the value of the data ("vi_assignment_group")
 
//Processing Script
var assignmentGroup = request.getParameter("vi_assignment_group") || "";
 

 

View solution in original post

2 REPLIES 2

Chris McDevitt
ServiceNow Employee
ServiceNow Employee

Hi,

Here is an example:

/*
XML & Jelly Example from:
UI Action: Bulk Edit
UI Page:
sn_vul_BulkVulnUpdateDialog
*/
//UI Page
<g:ui_reference name="vi_assignment_group" id="vi_assignment_group" table="sys_user_group"
 
//Client Script may process the value of the data ("vi_assignment_group")
 
//Processing Script
var assignmentGroup = request.getParameter("vi_assignment_group") || "";
 

 

@Chris McDevitt Thanks for your reply!
I have used the  request.getParameter() to get the values successfully!