Reference qualifier is showing only one value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 05:28 AM
Hello,
I am calling script include in reference qualifier and i am getting only one value, instead of showing related values.
script include i am using:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 05:44 AM
You are returning in the while loop, so returning one value after it is retrieved by the GlideRecord. Put this outside of the loop instead
platform: function() {
var app = current.cmdb_ci.getValue();
var gr = new GlideRecord('u_rm_data_management');
gr.addEncodedQuery('u_active=true^u_type=Choice^u_item=App Platform^u_applicationsLIKE' + app);
gr.query();
var result = [];
while (gr.next()) {
result.push(gr.sys_id.toString());
}
return 'sys_idIN' + result.join(',');
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 05:58 AM
Hello @Brad Bowman
when i tried that the field type is changing from reference to choice and not showing related values. please find the screen shots of that.
before
after
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 06:04 AM
Is this a reference field on the u_rm_data_management table? What is the column on this table with Display = true? Without any reference qualifier what do you see?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 06:08 AM
Hello @Brad Bowman
This is a reference field on different table which is getting data from u_rm_data_management table. in u_rm_data_management table there is list type field which is getting data from cmdb_ci.
the column with Display true is Value column nothing but a name. i didn't see any value after the field type got changed.