Advanced reference qualifier for variable in record producer

abjaffrey
Giga Guru

Hi all,

 

I have a use case in a record producer form

  • there is a requested for field which references the user table
  • there is an asset details field which references alm_hardware table

My need is that based on requested for, the asset details variable should only display the assets assigned to the selected user. can someone help me with this.

 

Advanced ref qualifier for the variable :

 

javascript: new getGroupMember().assignedAssets(caller_id);

 

SI:

 

    assignedAssets : function(getUser)
    {
        var assets = [];
        var abc = new GlideRecord('alm_hardware');
        abc.addQuery('assigned_to',getUser);
        abc.query();

        while(abc.next()){
            assets.push('asset_tag');
        }
        return assets;
    },

abjaffrey_0-1718780572040.png

 

2 ACCEPTED SOLUTIONS

Sebastian L
Mega Sage
javascript: 'assigned_to='+current.variables.caller_id

Just add this to the reference qualifier of  your asset details


Best regards,
Sebastian Laursen

View solution in original post

hi @Sebastian L 

 

thanks for the response, it worked.

 

View solution in original post

6 REPLIES 6

Sebastian L
Mega Sage
javascript: 'assigned_to='+current.variables.caller_id

Just add this to the reference qualifier of  your asset details


Best regards,
Sebastian Laursen

hi @Sebastian L 

 

thanks for the response, it worked.