Hi,

Did you check any parameter can be passed to set the ref qualifier?

something like this

function onClick(g_form) {

    g_modal.showFields({
        title: "Please provide all information for incident",
        fields: [{
            type: 'textarea',
            name: 'u_incidentreason',
            label: 'Incident description:',
            mandatory: true
        }, {

            type: 'reference', // type of modal (ie text, reference, etc)
            name: 'assignment_group', // reference field on the current record used to search
            label: 'Assignment Group', // message to display above the search field
            mandatory: true, // sets the field to mandatory
            reference: 'sys_user_group', // table that the reference field in "name" refers to
            referringTable: 'incident', // table of the current record
            referringRecordId: g_form.getUniqueValue(), // sys_id of the current record
            sysparm_query: 'sysId1,sysId2'

        }],
        size: 'md'

    }).then(function(fieldValues) {

        g_form.setValue('u_incidentreason', fieldValues.updatedFields[0].value);
        g_form.setValue("u_incident_creation", 'true');
        g_form.save();

    }

Regards
Ankur

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