Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Reference qualifier is showing only one value

Kumar147
Tera Contributor

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:

 

    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(',');
        }
    },
 
adv ref qual condition: javascript: new scriptinclude().fucntion();
 
Please help in this.
20 REPLIES 20

Hello @Moin Kazi 

 

tried but no luck. field type is changing to choice when i tried writing return outside of loop. is anything we can do with attributes: ref_auto_completer=AJAXReferenceChoice,encode_utf8=false,edge_encryption_enabled=true

 

Kumar147_1-1730209558054.pngKumar147_2-1730209565922.pngKumar147_3-1730209573044.png