Search code examples
maximo-anywhere

How to filter additionaasset lookup/dialog to only list assets at work order location


I have a need to filter the list of available assets from which to choose to those assets that reside at the location of the current work order. I do not want to see assets in the list that are not at the current location.

I have located a place in the javascript

 var filter = [];   
 filter.push({siteid: siteid});
 additionalasset.lookupFilter = filter; 

... which appears to let me push filters into a filter array. Would this be the ideal method to use? 1) Determine the location on the work order and 2) push an additional filter e.g.

filter.push({location: location});

I'm looking for a solution that is dynamic, such that if the user changes the location and then wants to select an asset, the available list of assets will update, based on this filter, to those assets at that location. I hope this is understandable.


Solution

  • Yes this is exactly how you should do this code wise. We had a bug (fixed in 7.5.2.1 I believe) where the very first location you picked would be reused the second time you tried to select the asset. If you're still seeing the same behavior at 7.5.2.1, open a PMR and we can get you an iFix to support this.