• Adi Jaradat

Maximo Location Hierarchy On Screen

Updated: Feb 25

Being able to visualize the Location Hierarchy path right on the screen is something most users will appreciate and get addicted to. Although reports are the best place where hierarchy trees can be presented nicely, it always help to have the hierarchy oath right there on screen.


In this post I will display the location hierarchy path in the Locations application screen. I prefer to keep this visualization in the Main tab and try to resist having it in the list tab as well. If you are confident (or want to check) that your database performance can take this extra load then go ahead.


For my current client, I did place the hierarchy path in the list tab! with some db tweaks.


Dummy Table, how dummy?


Dummy Table, a useful tool to get many things done if you keep it in your mind. In this post we will twist dummy table a bit to get some results which otherwise would be difficult to get.

Think of dummy table as something similar to DUAL in Oracle database or a select statement without from in MSSQL (not a fan).


In Oracle, Dual has one column named DUMMY with value of X. The popular use of Dual is to evaluate expressions and since it has a single column “DUMMY” you can expect only one result.


Maximo Dummy Table on the other hand is very similar to Oracle Dual but it has more than one column. In fact, Dummy table has a column for every Data Type.

Here is a list of all the Dummy Table columns:


Dummy Relationship … not so dummy after all!


Let us start by creating a new relationship between LOCATIONS (Parent) and DUMMY_TABLE (Child). This relationship should help up construct the Hierarchy Path of the current Location.


I won’t be able to go through the query in great detail here but you can learn all about in my previous posts:

Head to LOCATIONS object and go ahead and create the relationship.


1=2 UNION ALL 
SELECT NULL DUMMY_ALN 
,NULL DUMMY_INTEGER 
,NULL DUMMY_SMALLINT 
,NULL DUMMY_DECIMAL 
,NULL DUMMY_AMOUNT 
,NULL DUMMY_FLOAT 
,NULL DUMMY_YORN 
,NULL DUMMY_UPPER 
,NULL DUMMY_LOWER 
,NULL DUMMY_DATE 
,NULL DUMMY_TIME 
,NULL DUMMY_DATETIME 
,NULL DUMMY_DURATION 
,NULL DUMMY_CRYPTO ,TO_CLOB(TRIM(SUBSTR(SYS_CONNECT_BY_PATH(LS.LOCATION, ' > '), 3))) DUMMY_CLOB 
,NULL DUMMY_TABLEID 
,NULL DUMMY_BLOB 
,NULL DUMMY_CRYPTOX 
,NULL ROWSTAMP 
FROM 
    ( 
    SELECT LOCHIERARCHY.SITEID 
    ,LOCHIERARCHY.ORGID 
    ,LOCHIERARCHY.LOCATION 
    ,LOCHIERARCHY.PARENT 
    FROM LOCHIERARCHY 
    WHERE 1=1 
    AND LOCHIERARCHY.SYSTEMID='PRIMARY' 
    AND LOCHIERARCHY.SITEID=:SITEID 
    ) LS 
WHERE LS.LOCATION=:LOCATION 
START WITH LS.PARENT IS NULL 
CONNECT BY NOCYCLE PRIOR LS.LOCATION=LS.PARENT 
AND PRIOR LS.SITEID=LS.SITEID 
AND PRIOR LS.ORGID=LS.ORGID  

Screen Time


We got the rather “smart” relationship with “dummy” table going on, now all we got to do is to place a Text Box on the screen and configure it as such.

Once the user loads up a location in the Locations application, he will be greeted with “bread-crumb”-like location hierarchy path.


Having the hierarchy path laid down flat on screen helps a lot in not only visualizing the locations tree but also to maintain the hierarchy easily.


We mentioned “bread-crumb”-like location hierarchy path! sounds interesting but far apart (functionally and visually) from our “Text Box” Location hierarchy path.


Early on, we hit the road with a few custom Maximo visual components ,Generic iFrame and Connecting Google Charts with Maximo, maybe we can give a bread-crumb component a shot.

Links

https://adijaradat.com/post/connect-maximo-and-google-charts/

https://adijaradat.com/post/creating-maximo-generic-iframe-custom-component/

https://adijaradat.com/post/locations-hierarchy-generalized/

https://adijaradat.com/post/locations-hierarchy/

https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries009.htm

https://developer.ibm.com/static/site-id/155/maximodev/7609/maximocore/businessobjects/psdi/app/system/Dummy_Table.html

14 views0 comments

Recent Posts

See All
 
  • LinkedIn
  • Twitter

©2021 by Adi Jaradat.