- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2020 06:36 AM
I have created UI page and called from UI action in incident table,
<g:ui_reference name="parent_id" id="parent_id" table="sys_user" query="active=false"/>
I want to filter the reference list with ('active=false^u_incident=' + sys_id),
Can anybody suggest me how can I achieve this ?
Solved! Go to Solution.
- Labels:
-
Script Debugger
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2020 07:45 AM
Hi Santosh,
You can achieve this as below
I assume this UI action is on Incident table and you want to send current incident sys_id to UI page
The UI page will display user records where it is active=false and current incident
Sample UI Action:
Onclick: showIncident()
Script:
function showIncident(){
var sysId = g_form.getUniqueValue();
var gDialog = new GlideDialogWindow('show_Incident');
gDialog.setSize('600','600');
gDialog.setPreference('sysparm_sysID', sysId);
gDialog.setTitle('Create Incident');
gDialog.render();
}
Sample UI Page:
HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="jvar_incident_id" value="${RP.getWindowProperties().get('sysparm_sysID')}"/>
<g:ui_reference name="incident" id="incident" table="incident" completer="AJAXTableCompleter" query="active=false^u_incident=${jvar_incident_id}"/>
</j:jelly>
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2020 07:45 AM
Hi Santosh,
You can achieve this as below
I assume this UI action is on Incident table and you want to send current incident sys_id to UI page
The UI page will display user records where it is active=false and current incident
Sample UI Action:
Onclick: showIncident()
Script:
function showIncident(){
var sysId = g_form.getUniqueValue();
var gDialog = new GlideDialogWindow('show_Incident');
gDialog.setSize('600','600');
gDialog.setPreference('sysparm_sysID', sysId);
gDialog.setTitle('Create Incident');
gDialog.render();
}
Sample UI Page:
HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="jvar_incident_id" value="${RP.getWindowProperties().get('sysparm_sysID')}"/>
<g:ui_reference name="incident" id="incident" table="incident" completer="AJAXTableCompleter" query="active=false^u_incident=${jvar_incident_id}"/>
</j:jelly>
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader