Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

How to filter assets displayed in the “Add” dialog under Planned Assets in HAM Workspace?

Sharath807
Tera Contributor

Hi ,

I am working with the Hardware Disposal Order in ServiceNow HAM Workspace. The table is sn_hamp_hardware_disposal.

On the Disposal Order record, there is a Planned Asset tab with an Add button. When the user clicks Add, the asset selection dialog currently displays all assets.

Our requirement is to restrict the assets displayed in this dialog based on the values selected on the Disposal Order.

The expected filtering criteria are:

Asset Stockroom = Stockroom selected on the Disposal Order
AND
Asset State = In Stock
AND
Asset Substate = Pending Disposal

For example, if the user selects Stockroom A on the Disposal Order and clicks Add under Planned Assets, only assets that meet all three conditions should be displayed:

  • Stockroom = Stockroom A
  • State = In Stock
  • Substate = Pending Disposal

The filtering needs to work dynamically based on the Stockroom selected on the Disposal Order.

Since this is happening in HAM Workspace, I am not sure whether the asset selection dialog is controlled by a Reference Qualifier, Workspace configuration, UI Builder component, Data Broker, or some other HAM-specific configuration.

Could someone please advise!!!!


Sharath807_0-1788273845829.png

 








4 REPLIES 4

Sanjay191
Kilo Patron

Hi @Sharath807 
Similar thing we have done in EAM So pleae refer the below...

This is handled by an OOB Script Include, EAMDisposableAssetFilterUtil, where you need to make the required changes to your filter.

Like we have changs below you need to make changes according to your requirement

 

Sanjay191_0-1788509623799.png



Note:  This is the for the EAM if you have HAM then just  search for the DisposableAssetFilterUtil , I hope you will find this and if not then please reply me.

 If you found my response helpful and it answered your question, please consider marking it as the accepted solution and giving it a thumbs up. It helps others in the community find the solution more easily.

Thank you!

Hi @Sharath807 

I hope you are doing great !

 

 If you found my response helpful and it answered your question, please consider marking it as the accepted solution and giving it a thumbs up. It helps others in the community find the solution more easily.

Thank you!

Sharath807
Tera Contributor

Hi @Sanjay191  the screenshot was not clear .. Can you share the script ?

Hi @Sharath807 

The exact Script Include is “HampHWDisposalUtils”, which is used to filter the asset data available for disposal in the HAM Workspace.

Sanjay191_0-1788958086225.png



Note : -  This is an OOB Script Include. Please analyze it thoroughly before making any changes, as modifications may impact future upgrades if the Script Include is updated or replaced in a future release.


 If you found my response helpful and it answered your question, please consider marking it as the accepted solution and giving it a thumbs up. It helps others in the community find the solution more easily.

Thank you!