Maximo Open Forum

 View Only
Expand all | Collapse all

Search for PMs assigned to assets

  • 1.  Search for PMs assigned to assets

    Posted 12-14-2022 16:31
    I've seen this before but can't put my finger on it now - in the PM app, how do you find PMs for assets when you only know the locations they belong to?
    #Assets
    #WorkManagement

    ------------------------------
    Mack Parrott
    Projetech Inc.
    ------------------------------


  • 2.  RE: Search for PMs assigned to assets

    Posted 12-15-2022 08:26
    There may be something more interesting, but I'd add a new relationship field (ASSET.LOCATION) to the advanced search.

    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 3.  RE: Search for PMs assigned to assets

    Posted 12-16-2022 10:19
    In our environment, there's an out-of-the box relationship for (ASSET.LOCATION), added to Adv Search, the limitation is it will not consider child locations.  UNLESS you have built your loc hierarchy such that children cascade down off the parent.   In my example, a query for 604 is actually a search for 604% and nicely brings in all assets for 604 location and all children.

    I'm looking forward to testing Petra's solution as well - it would be better in that it does not have the requirement for cascading Location ID's.

    ------------------------------
    Mack Parrott
    Projetech Inc.
    ------------------------------



  • 4.  RE: Search for PMs assigned to assets

    Posted 12-15-2022 08:58
    In the Advanced Search dialog, I have the "Search Location Hierarchy" option.  I *think* it's an out-of-the-box field (unless I was really OCD and manually renumbered the Control ID in the XML file).  Anyways, it uses the PRIMARYSYSLOCPM.ANCESTOR relationship.

    So do as Steven said if you know the precise location, else Search Location Hierarchy for, say, finding all the Assets in a building, regardless of where in the building it is.

    ------------------------------
    Travis Herron
    Pensacola Christian College
    ------------------------------



  • 5.  RE: Search for PMs assigned to assets

    Posted 12-15-2022 16:43
    Sounds logical, Travis, but Maximo doesn't behave that way - when I use the drilldown in Search Location Hierarchy, find a location and search, I only get PMs for locations at that level and below.

    I'm going to review the other suggestions now.

    ------------------------------
    Mack Parrott
    Projetech Inc.
    ------------------------------



  • 6.  RE: Search for PMs assigned to assets

    Posted 12-15-2022 16:55
    Yes, you are right.  So it's going to have to be a custom relationship then.  Do you need the search to also include Route Stops?

    ------------------------------
    Travis Herron
    Pensacola Christian College
    ------------------------------



  • 7.  RE: Search for PMs assigned to assets

    Posted 12-16-2022 09:54
    This may be going beyond what the OP was asking for, so this could be trimmed/modified, but it's not uncommon that I might want to see all the PM's for a particular building.  That could be that the PM:
    --is made for a Location, and the Location is in (is a child Location of) the building
    --is made for an Asset, and the Asset's Location is in the building
    --has a Route, and the Route has a Route Stop that is a Location in the building
    --has a Route, and the Route has a Route Stop that is an Asset, and that Asset's Location is in the building.

    WHERE siteid = 'MYSITE' and  
    ((location is not null and location in (select location from locancestor where siteid = 'MYSITE' and ancestor = 'BUILDING')) or 
    (assetnum is not null and assetnum in (select assetnum from asset where siteid = 'MYSITE' and location in (select location from locancestor where siteid = 'PCC' and ancestor = 'BUILDING'))) or 
    (route is not null and (route in (select route from route_stop where location is not null and location in (select location from locancestor where siteid = 'MYSITE' and ancestor = 'BUILDING')) or 
    route in (select route from route_stop where assetnum is not null and assetnum in (select assetnum from asset where siteid = 'MYSITE' and location in (select location from locancestor where siteid = 'MYSITE' and ancestor = 'BUILDING'))))))​


    Then the next trick would be to figure out how to convert that into a Relationship that could be used in the UI, instead of having to manipulate it in the WHERE clause (that not everyone would have access to).

    ------------------------------
    Travis Herron
    Pensacola Christian College
    ------------------------------



  • 8.  RE: Search for PMs assigned to assets

    Posted 12-15-2022 09:01
    Hi Mack,

    I think there are few possibilities for this:
    - have the list of all assets in the locations then query by assets in the PM application;
    - in PM > Advanced Search > Where clause use something like: assetnum in (select assetnum from asset where location in ('X','Y','Z'))

    ------------------------------
    Dragos Chitu
    EL
    ------------------------------



  • 9.  RE: Search for PMs assigned to assets

    Posted 12-16-2022 09:26
    We have a query for this very issue. 

    siteid = 'MAINT' and assetnum in (select assetnum from asset where siteid=pm.siteid
    and location in (select location from locancestor where ancestor = 'C' and siteid = asset.siteid and location=asset.location))

    In our case, the ancestor "C" is for our Central Region, but could be replaced with a location code. 
    Hope this helps.

    ------------------------------
    Petra Harris
    Wake County Public School System
    ------------------------------



  • 10.  RE: Search for PMs assigned to assets

    Posted 12-16-2022 11:38
    Your solution works quite well, Petra - thank you.

    ------------------------------
    Mack Parrott
    Projetech Inc.
    ------------------------------



  • 11.  RE: Search for PMs assigned to assets

    Posted 12-16-2022 11:43
    Thanks for the confirmation Mack. 
    Glad that works for you. 
    We actually tell our staff to search by Crew and Owner, that way they find all PM's they are responsible for.

    ------------------------------
    Petra Harris
    MAXIMO Product Manager
    Wake County Public School System
    ------------------------------