Search code examples
maximo-anywhere

How to add an advanced search form for assets?


I have modified the Work Execution app to initially filter for assets in the asset lookup to the location specified in the Work Order Details view. That works. So, when a user selects Location 425, then clicks the Asset Lookup, they're initially presented with only those assets at Location 425. However, that list is comprised of about 500 assets. They're not barcoded so the user can't quickly scan a value. And our naming conventions aren't such that the user can search on description effectively.

I need the capability to perform an advanced search against the AdditionalAssets resource using a view much like the user has available when searching for a work order; the user would be able to fill out a list of asset detail values, click search, and the list would be further filtered to those that match the criteria.

Can anybody suggest how to go about accomplishing this?


Solution

  • Easiest way is to simply add the other fields to the search criteria of the lookup. Even if the fields are not visible in the lookup dialog, they can be searched with the simple lookup search box. Here's an example lookup that searches the location description and name as well as the asset description and name.

    <list id="WorkExecution.AssetLookup_additionalasset_list" resource="additionalasset">
                    <searchAttributes id="WorkExecution.AssetLookup_additionalasset_searchAttributes">
                        <searchAttribute id="WorkExecution.AssetLookup_additionalasset_searchAttribute_assetnum" name="assetnum"/>
                        <searchAttribute id="WorkExecution.AssetLookup_additionalasset_searchAttribute_description" name="description"/>
                        <searchAttribute id="WorkExecution.AssetLookup_additionalasset_searchAttribute_location" name="location"/>
                        <searchAttribute id="WorkExecution.AssetLookup_additionalasset_searchAttribute_locationdesc" name="locationdesc"/>
    

    If you don't like the user experience of this, you'll have to make your own custom view.