
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2017 10:45 AM
Greetings Everyone!
I have a catalog item and have a classification Field( Variable) which is reference to custom table ( Classification). I have created a UI page in my Catalog Item with Group Roles and User ID.
Now, the Group Role is reference to Custom Table ( Group) which has Group Roles tagged to Classification above ( Only two Classification, A & B).
Now, My requirement is If I choose A in my Classification Field,Only the roles tagged to A should be listed in my Group Role Field and If Chosen B, the roles that are tagged to B should be listed in my Group Role reference field.
I have tried different option but no luck. Please let me know if there is something way we can achieve my requirement.
My HTML Code:
<TD><g:ui_reference name="group_role" query="u_classification=u_pgm_classification.value" id="Group_Role" table="u_pgm_group_role" completer="AJAXTableCompleter" columns="u_group_role" /></TD>
<TD><g:ui_reference name="ln_user" query="active=true^u_employee_type=SAPHR" id="ln_user" table="sys_user" completer="AJAXTableCompleter" columns="user_name" /></TD>
Corresponding Client Script:
var root = document.getElementById(r);
var allRows = root.getElementsByTagName('tr');
var cRow = allRows[1].cloneNode(true);
var j = 0;
for (j = 0; j < cRow.cells.length; j++) {
if(j>0 && j!=4){
document.getElementById('fn_user').value = '';
document.getElementById('sys_display.fn_user').value = '';
document.getElementById('ln_user').value = '';
document.getElementById('ln_user').name = '';
document.getElementById('sys_display.ln_user').value = '';
}
}
root.appendChild(cRow);
}
function deleteRow(r) {
try {
var table = document.getElementById(r);
var rowCount = table.rows.length;
for(var i=0; i<rowCount; i++) {
var row = table.rows[i];
var chkbox = row.cells[0].childNodes[0];
if(rowCount>2){
if(null != chkbox && true == chkbox.checked) {
table.deleteRow(i);
rowCount--;
i--;
}
}
}
}
catch(e) {
alert(e);
}
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2017 08:20 AM
Hi Ankur,
Apologies for the delay in response. I tried in my personal instance and its not working as expected. Would you be able to check mine if I share my creds?
Pls confirm. I will mail the details..
Thanks
Shan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2017 08:11 AM
Hi Ankur,
Will test the above code and update the result at the earliest.
Thanks
Shankar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2017 02:41 AM
Hi Shankar,
Any update on this?
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
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
‎09-25-2017 04:40 AM
Hi Shankar,
Any update on this?
Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
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
‎09-25-2017 08:20 AM
Hi Ankur,
Apologies for the delay in response. I tried in my personal instance and its not working as expected. Would you be able to check mine if I share my creds?
Pls confirm. I will mail the details..
Thanks
Shan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2017 09:17 AM
Hi Shankar,
If you have followed the steps I mentioned it should work and there should not be any issue.
just check the code again.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader