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.

How do Reference Qualifier on variable work on Target Record once the Record Producer?

Swathi P
Tera Guru

Hello Team,

 

I have reference qualifier available on Record Producer . I want it work on Target Record if the user wants to edit the variable from Target Record How can i achieve this 

13 REPLIES 13

Swathi P
Tera Guru

My Reference qualifier is working fine on Record Producer but not once the Record Producer is submitted. I am trying open the submitted record from Portal 

@Swathi P 

so did you debug if script include is getting called when 2nd variable is being clicked with lookup icon?

add logs and see what value came in? if value is getting passed correctly in script include.

you didn't share complete script include.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Swathi P
Tera Guru

Yes it is getting inside script include This is my Script include

getGroupMembers: function(producerGr) {
        var transactionType, itemType, gcurrency, gAmount, gSGDAmount, hCurrency, hAmount, hSGDAmount, requestor;
        transactionType = producerGr.u_type_of_submission,
        itemType = producerGr.type_of_request;
        gcurrency = producerGr.u_gift_currency;
        gAmount = producerGr.u_average_amount;
        gSGDAmount = producerGr.u_average_amount_sgd;
        hCurrency = producerGr.u_hosp_currency;
        hAmount = producerGr.u_hosp_average_amount_1;
        hSGDAmount = producerGr.u_hosp_average_amount;
        requestor =  producerGr.opened_by;

        var wf_amt = producerGr.workflow_amount;

        gs.info("TEST THE qUALIFIER");
        gs.info('workflow_amt ' + wf_amt);

        var answer = 'sys_idIN';
        var userList = [];
        var approverGroup = this.getGroup(transactionType, itemType, gcurrency, gAmount, gSGDAmount, hCurrency, hAmount, hSGDAmount, requestor);
        var groupMemberGr = new GlideRecord('sys_user_grmember');
        groupMemberGr.addQuery('group', approverGroup);
        groupMemberGr.query();
        while (groupMemberGr.next()) {
            userList.push(groupMemberGr.user.toString());
        }
        answer += userList.join(',');
        return answer;
    },

Swathi P
Tera Guru

Actually It is not getting inside the script include Is it a problem since i am calling trying it from Portal