Need assistance on the Advance reference qualifier

dhineshkumar
Tera Guru
 

dhineshkumar_0-1715234583810.png

 

when I selects the YES (do you know the location or not) location records should be show, if no all location records are empty. Based on the location its shows the device. Please help me with this task. Device reference table is alm_hardware. The table alm_hardware have the location field.

Thank you.

8 REPLIES 8

@Jaspal Singh 

javascript:'location!=NULL^location='+current.variables.u_location

I applied this script on my device reference variable still not working the functionality.

Thank you.

@dhineshkumar 

Along with script also use : ref_qual_elements=u_location

@dhineshkumar ,

 

I tried the below in my pdi its working please check,

swathisarang98_0-1715694666594.png

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

 

Kavita_Bhojane
Tera Guru

Hi @dhineshkumar ,

You can call below function in reference qualifier:-

javascript: new global.getLocationsSI().getLocations(current.variables.know_location);

 

SI-

 

var getLocationsSI = Class.create();
getLocationsSI.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getLocations: function(know_location) {
    
    var strQuery = '';
    if (know_location == 'Yes' || know_location == '') {
        strQuery = 'sys_idISNOTEMPTY';
    } else {
        strQuery = 'sys_idISEMPTY';
    }
    
    return strQuery;
},

type: 'getLocationsSI'
});

 

 

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Kavita Bhojane