there is a problem in reference qualifier

shaafi9631
Tera Contributor
HELP!!!
writing a script include that it should only display assigned to fields which are same as to caller field location, assigned to field should only display the records which has same location as caller.
reference qualifier.jpg

var getHardwareUser = Class.create();
getHardwareUser.prototype = {
    initialize: function() {},

    user: function(userid) {
        var arr = [];
        var s;
        var gr = new GlideRecord("sys_user");
        gr.addQuery("sys_id", userid);
        gr.query();
        while (gr.next()) {
            loc1 = gr.location;
            gs.info(loc1);
        }
        var grr = new GlideRecord("sys_user");
        grr.addQuery("location", loc1);
        grr.query();
        while (grr.next()) {
            s = grr.sys_id;
            arr.push(s);
            gs.info(s);
        }
        return 'sys_idIN' + arr.join(",");

    },

    type: 'getHardwareUser'
};
1 ACCEPTED SOLUTION

Hi @shaafi9631 ,

did you add it in the dictionary override?

it's for the incident table assigned to field only right?

open the dictionary override record of the assigned to field 

ChaitanyaILCR_0-1751028295109.png

and add it

ChaitanyaILCR_1-1751028300007.png

 

don't wanna keep the existing ref qual conditions?

if you want to keep the existing condition and extend this addition filter use this

else use the ref qual I share in the ref qual directly

ChaitanyaILCR_2-1751028494255.png

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

 

View solution in original post

8 REPLIES 8

Chaitanya ILCR
Kilo Patron

Hi @shaafi9631 ,

you can just add this in the reference qualifier

javascript:'location='+current.caller_id.location
javascript:'location='+current.caller_id.location

you don't need to use script include

 

note replace : with" : "

refer below screenshot

ChaitanyaILCR_0-1751027536698.png

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

not working 

shaafi9631_1-1751027817297.png

 

Hi @shaafi9631 ,

did you add it in the dictionary override?

it's for the incident table assigned to field only right?

open the dictionary override record of the assigned to field 

ChaitanyaILCR_0-1751028295109.png

and add it

ChaitanyaILCR_1-1751028300007.png

 

don't wanna keep the existing ref qual conditions?

if you want to keep the existing condition and extend this addition filter use this

else use the ref qual I share in the ref qual directly

ChaitanyaILCR_2-1751028494255.png

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

 

can you please also provide solution through script include