show assets based on assignment group of stockroom

Ramakrishna Rao
Tera Contributor

Hi ServiceNow Community,

 

There is one catalog item for asset allocation in which when the req is submitted and sc_task is created under RITM for specific group. If I change the assignment group on sc_task(manually) then i want to show assets belong to the stockroom of that assignment group which are in stock and available. How can I do this One?

Please give your inputs.

9 REPLIES 9

Dinesh Chilaka
Mega Sage

@Ramakrishna Rao ,

Can you elaborate the question like asset is an Catalog item variable or a custom field on the sc_task table?

and attach screenshots as well

 

Thanks,

Dinesh

asset is a catalog variable and it is also present on the sc_task form

Then this is just a ref qual you have to specify on your reference field/variable that points at the asset table.

Something like this

javascript:"stockroom.assignment_group=" + current.getValue("assignment_group");

 

Then add "ref_qual_elements=assignment_group" to the attributes.

 

But this is going to cause issues if the var is on the cat item when it is filled out.  So you may want to not display it there if it is and also on the Requested item you may want to make it read only because its going to have issues there.

 

 

I have tried this approach but it is not working and also want to know whether  reference qualifier works when the sc_task assignment group changes on the sc_task?