Can we pass two parameters of the script include in the List collector Qualifier

Samiksha2
Mega Sage

Hi,

How we can pass two parameters in the list collector advance qualifier.

Thanks

17 REPLIES 17

Not working Pavan.

Hi,

can you share complete script include which you are tried and reference fields and logs screenshots?

Those will be helpful.

 

Thanks,

Pavankumar

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Mahendra RC
Mega Sage

Hello Samiksha,

Please use the below script in your Script include:

getProdRole: function(userGuid, roleName) {
        var recordSysIDs = [];
        if (roleName == 'Manager') {
            roleName = 'owned';
        }
        var gec = new GlideRecord('u_product');
        gec.addQuery(roleName, gec);
        gec.query();
        while (gec.next()) {
            recordSysIDs.push(gec.getUniqueValue());
        }
        return "sys_idIN" + recordSysIDs.toString();
    },

Reference Qualifier code:

javascript:new getRoles().getProdRole(current.variables.select_the_user, current.variables.select_people_role);

If my answer helped you in any way then please do mark it as helpful. If it answered your question then please mark it correct and helpful.

Thanks

 

Not working Mahendra.

I checked values are coming in logs. But in the form it is not coming.