Service Catalog Configuration Item LookUp

Priyanka Gupta
Mega Guru

I have a Catalog Item 'Loaner Laptop Request'. I am creating a task using a workflow and assigning it to the concerned team as soon as a user creates a loaner laptop request.

After the task has been assigned to the concerned team, I want to give them the power to assign a respective Configuration Item to the requester. The requirement is to show only 'In Stock Computers' in the Configuration Item lookup instead of all the CIs.

task.PNG

I tried writing a Dictionary Override -> Reference Qualifier with a custom condition on sc_task but I don't think this is a good idea because my application is in a global scope.dic_over.PNG

How should I achieve this?

1 ACCEPTED SOLUTION

Priyanka Gupta
Mega Guru

I created a JavaScript function and applied it to the reference qualifier to filter off of cmdb. It works like a charm. 🙂

View solution in original post

12 REPLIES 12

If you drop me email i shall send u the xml file


Yes! It has a reference qualifier in another application. Is there a workaround?



Could you please share your email id with me or tell me how to go looking for it? I tried looking at you vcard in your profile. There's no email showing up there.


Vishal Khandve
Kilo Sage

maay br this code help you



var asset = new GlideRecord('hardware');


asset.addQuery('model', current.cat_item.model);


asset.addQuery('install_status', 6);


asset.query();


if(asset.next())


{


asset.reserved_for = current.request.requested_for;


asset.request_line = current.sys_id;


current.variables.Asset_Tag = asset.asset_tag;


current.variables.Hidden_Field = "item_in_stock";


asset.update();


return 'yes';


}


else


{


current.variables.Hidden_Field = "item_not_avalible";


return 'no';


}


I want to create a filter on the lookup search icon of the Configuration Item marked with red in the first image. I am very new to SN. It would be helpful if you tell me where do I write this script?