IBM Support

Updating or Changing the ownership of an existing query in Maximo

Technical Blog Post


Updating or Changing the ownership of an existing query in Maximo


Query ownership :


In Maximo you have public queries created by an user and then you may want to change the ownership of the queries, for example, when you have some Maximo public queries created by an user that left the company, and you need to change the ownership of those public queries so that you can update the queries


As for changing the public query ownership in Maximo, by design, some "User A" cannot change a query which has been created by "User B". It was designed based on the saved query function. 


You would need to connect your Database and backend change the query ownership with a simple edit from QUERY table the OWNER field is the user who wrote(saved) the query, change this value to set the new owner. 
The only known workaround to take ownership of a query created by another user is to update the "owner" of that query via the back-end (sql update). 
For your information all queries created/saved by a user as Public will be displayed under the View/Manage Queries list of all users. 

These queries cannot be deleted by any other users including maxadmin from View/Manage Queries list. Only the creator of the query can delete the query. 
If needed, the following workarounds can be used by maxadmin to disable/delete any user's queries from appearing in other users' View/Manage Queries list. 
To make the query accessible only to the creator: 
update maximo.query set ispublic=0 where queryid=xx ; 
To delete the query: 
delete from maximo.query where queryid=xx ; 


Start Center Templates and queries :


Now, consider this specific case scenario, where a query and start center were created by someone who is no longer in your company. And you have a new policy to create the query and start center as MAXADMIN user from now on.   
If you do a datafix and update the query and layout table to have the owner 'MAXADMIN' for example, it works until you click Update Start Center and then it changes the layout table back to the owner it had before the datafix was done. 


Updating the query works fine for the ownership. The problem is that the start center that uses that query also has a table called LAYOUT. In other words, the update to the ownership on the layout table is overridden back to the prior owner when you click Update Start Center in the Maximo front-end.       


Considering this scenario with the Update Start Center action, as per the IBM Maximo Asset Management 7.x Entity Relationship Diagrams (ERDs) document, there is another table called SCTEMPLATE with a PRESENTATION field that holds the information por the previous template owner, which must be changed too.


Maximo 7.x ERD document displays the info that the LAYOUT table can relate to SCCONFIG, SCTEMPLATE, PORTLET and PORTLETDISPLAY. So it is worth to look into those tables too for any information that is not pulled correctly on the System.


[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]