Need to populate Asset Serial number in service catalog variable

varma2
Mega Sage

Hi All,

 

 

Need to populate requested for assets in lookup variable in catalog.

 

we have a requested for variable  and  we need to get the value of requested for Assets serial number from the (Alm_hardware ) table to populate in  (serialnumber_varible ) lookup select box in catalog item.

 

Please suggest.

 

Thank you all.

 

 

28 REPLIES 28

Ankur Bawiskar
Tera Patron
Tera Patron

@varma2 

are you saying you want to apply filter on that lookup variable to show assets only for the selected user?

if yes then add this in advanced ref qualifier on that lookup variable

javascript:'assigned_to=' + current.variables.requested_for;

Also in variable attributes add this

ref_qual_elements=requested_forVariableName

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Hi @Ankur Bawiskar ,

 

Thanks for reoly,

 

I want to populate the asset ( serial number)  in the lookup variable. based on selection of user ( requested for ) asset serial number in lookup variable. 

 

Please sugget,

Thank you.

 

@varma2 

why to auto-populate? what happens if user has more than 1 asset assigned?

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

Hi @Ankur Bawiskar ,

 

They will select manually if the user more then one asset, we need to papulate list of serial numbers.

please suggest.

Thanks,