Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Adding Parent Location and Parent Location Description in Select Value dialog box of Location field in Maximo

    Posted Wed June 01, 2022 10:28 AM
    Hi Guys,
    Can someone tell me step by step procedure on how to add Parent Location and Parent Location Description in Select Value dialog box of Location field?

    Thanks in Advance

    ------------------------------
    mx pro
    ON
    ------------------------------

    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: Adding Parent Location and Parent Location Description in Select Value dialog box of Location field in Maximo

    Posted Wed June 01, 2022 08:54 PM
    You can export the lookups.xml from application designer. Go to locations lookup (I think it would be table id="locations") and then add the parent location and parent location description by using tablecol. You may need to create relationship to get parent record. In dataattribute binding you can use relationshipname.attributename to specify attribute fetched using relationship. 

    ------------------------------
    Manoj Sawant
    Maximo Consultant
    Wipro Technologies
    Adelaide
    ------------------------------



  • 3.  RE: Adding Parent Location and Parent Location Description in Select Value dialog box of Location field in Maximo

    Posted Thu June 02, 2022 04:00 AM
    Edited by System Admin Wed March 22, 2023 11:46 AM
    To expand a bit on changing the XML definitions in general:

    Updating Lookups.xml would change it system wide for all applications using the id="locations" lookup.
    If you're looking to change it only for a specific application, say WOTRACK, you can copy the XML starting from <table id= and ending with </table> and add that to your application XML file.
    When in the WOTRACK application it will use the local definition of the lookup with all your changes, but other applications will use the global from Lookups.xml.

    Additionally you can create a custom definition in Lookups.xml and utilize those across multiple applications if you don't want to change it system wide for everyone every lookup, but for specific ones in multiple applications.

    (Edited for clarity)

    ------------------------------
    Henrik Christiansen
    ------------------------------



  • 4.  RE: Adding Parent Location and Parent Location Description in Select Value dialog box of Location field in Maximo

    Posted Thu June 02, 2022 10:00 AM
    One other consideration.  A location can belong to more than one system and can have a different parent in each of those systems.  If you have just one system, then that is fine.  If you have multiple systems you will have to decide from which system the parent is shown.

    ------------------------------
    Steve Hauptman
    ------------------------------



  • 5.  RE: Adding Parent Location and Parent Location Description in Select Value dialog box of Location field in Maximo

    Posted Thu June 02, 2022 10:14 PM
    thanks all for the info

    ------------------------------
    mx pro
    ON
    ------------------------------



  • 6.  RE: Adding Parent Location and Parent Location Description in Select Value dialog box of Location field in Maximo

    Posted Fri June 03, 2022 01:31 AM
    Hi Steve,

    I've already replied to this in another post.  You don't have to choose, just use the correct relationship which is LOCATION_PARENT_SYS

    ------------------------------
    ===============================
    Craig Kokay,
    Lead Senior Maximo/IoT Consultant
    ISW
    Sydney, NSW, Australia
    Ph: 0411-682-040
    =================================
    #IBMChampion2022
    ------------------------------



  • 7.  RE: Adding Parent Location and Parent Location Description in Select Value dialog box of Location field in Maximo

    Posted Fri June 03, 2022 10:51 AM
    Hi Craig,

    Maybe I am missing something, but I think that will show "a" parent of the location if there are many.  I think which one it shows may be somewhat random.   But, you made me think, so I did more research.  There are actually 2 non-persistent fields - parent and systemid which could be just used with no further needs.  The code for those work basically to use the Primary system unless the location is not part of the primary in which case they are set to the first parent/system found.  For the parent description, it would then just be a simple relationship to that parent location record.

    ------------------------------
    Steve Hauptman
    ------------------------------



  • 8.  RE: Adding Parent Location and Parent Location Description in Select Value dialog box of Location field in Maximo

    Posted Sat June 04, 2022 06:28 AM
    Hi Steve,

    Yup, thanks for thinking this through a bit more.

    So, if I have a location ADDR2001 and it lives in the GEO and SANITARY systems, neither of which are a primary system.

    When the location lookup is used it's only looking at the LOCATIONS object i.e. a single entity with no reference to a system.  So, where on earth is the SYSTEMID coming from? We;; nowhere at this point.

    Back to the OP, the question was asked about how to display the parent and its description to the Locations lookup.  We've got a solution to show a parent, but a location can have multiple, so this cannot be done unless a key change is done in the query used to form the relationship.

    You would either need to perhaps hardcode the SYSTEMID into the relationship.  Typicall it's the primary system for the site, but that's not going to work for the ADD2001 location.  Which just means that at the moment no parent would show.

    ------------------------------
    ===============================
    Craig Kokay,
    Lead Senior Maximo/IoT Consultant
    ISW
    Sydney, NSW, Australia
    Ph: 0411-682-040
    =================================
    #IBMChampion2022
    ------------------------------



  • 9.  RE: Adding Parent Location and Parent Location Description in Select Value dialog box of Location field in Maximo

    Posted Mon June 06, 2022 08:37 AM
    Hi,

    Those non-persistents will always have a value.  The default is the Primary system.  In the case of ADDR2001, it is almost random, but on of the two you mention would appear - which one depends on the database type, data and indexes.

    Steve

    ------------------------------
    Steve Hauptman
    ------------------------------