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

chrisperry
Giga Sage

Can you please explain more what you're trying to do / share screenshots?

If this answer is helpful please mark correct and helpful!

Regards,

Christopher Perry

If this answer is helpful please mark correct and helpful!

Regards,
Chris Perry

Hi @christopherperry ,

I have a script include in which I am adding two parameter,

script include name= getRoles

function name= getProdRole

var roleName = this.getParameter('sysparm_role_name');

var p_dri = this.getParameter('sysparm_callerSysID');

 

How I will add this in my List collector Reference Qualifier?

 

 

To pass multiple parameters to a script include it would look like:

javascript: new getRoles().getProdRole(sysparm_role_name, sysparm_callerSysID);

If this answer is helpful please mark correct and helpful!

Regards,

Christopher Perry

If this answer is helpful please mark correct and helpful!

Regards,
Chris Perry

Hello,

Thank you for reply.

 

this is my script

 getProdRole: function() {
        var gr;
        var gec = this.getParameter('sysparm_callerSysID');
        var roleName = this.getParameter('sysparm_role_name');
        if (roleName == 'Manager') {
            roleName = 'owned';
        }
        var gec = new GlideRecord('u_product');
        gec.addQuery(roleName, gec);
        gec.query();
        while (gec.next()) {
            //dri.push(gec.name.toString());
            var pri = gec.name.toString();
        }
        return "sys_idIN" + gr.toString();
        //return JSON.stringify(gr);
    },

 

and List collector variable is -

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

 

What i am doing wrong?