Selasa, 11 Februari 2014

Editing 'Go To' menu

Maximo 6 and 7 do not provide a mean to create groups in the 'Go To' menu or to move applications from one menu to another. I this article I describe a procedure to edit the Maximo 'Go To' menu.
WARNING: I strongly suggest to backup your database before making these changes.

Where and how information are stored

Maximo 'Go To' menu structure and information are stored into MAXMENU table. To understand how this information is structured you can execute the following database query and compare the results with the actual content of the Go To menu.
select * from MAXMENU
where menutype = 'MODULE'
order by position, subposition

You will see that some entries in the table do not show up in the menu. This is because the visible field is set to 0 (hidden) or because the application specified in the KEYVALUE field does not exists.
A simple list of menus is also stored in the MAXMODULES table.
select * from MAXMODULES

Create a menu group

Calculate group position (GROUP_POS)

Using the following query identify the maximum value of the POSITION column:
select max(position) from MAXMENU where menutype = 'MODULE'

The returned value is typically around 4200. Add some hundreds to this to get a suitable value for the GROUP_POS needed later. Setting GROUP_POS=8000 is a safe value.

Calculate menu id (GROUP_ID)

Using the following query identify the maximum value of the MAXMENUID column:
select max(maxmenuid) from MAXMENU

The returned value is typically around 10000. Add some thousands to this to get a suitable value for the GROUP_ID needed later. Setting GROUP_ID=20000 is a safe value.

Identify menu icon (ICON_FILE)

Menu groups have an associated icon. Available icons are in the following folder: Maximo\applications\maximo\maximouiweb\webmodule\webclient\images. It must be a 16x16 GIF icon.

Create menu group

Choose a suitable name (GROUP_NAME) and description (GROUP_DESC) for your group and execute the following SQL statement.
insert into MAXMENU (
MENUTYPE, MODULEAPP, POSITION, SUBPOSITION,
ELEMENTTYPE, KEYVALUE, HEADERDESCRIPTION,
VISIBLE, IMAGE, MAXMENUID)
values (
'MODULE', '[GROUP_NAME]', [GROUP_POS], 0,
'MODULE', '[GROUP_NAME]', '[GROUP_DESC]',
1, '[ICON_FILE]', [GROUP_ID])

Insert the menu in the MAXMODULES table.
insert into MAXMODULES (
MODULE, DESCRIPTION, MAXMODULESID
values (
'[GROUP_NAME]', '[GROUP_DESC]', 50)

Restart Maximo application.

Move applications in a different menu

Identify the application that must be moved using the following query:
select * from MAXMENU
where menutype = 'MODULE' order by position, subposition

The ELEMENTTYPE field should be ‘APP’.
Check the selection with a query like this:
select * from MAXMENU
where elementtype='APP' and keyvalue='[APP_NAME]';

Only one row with your application must be returned.
Find a suitable position id (APP_POS) and change the select statement into an update in the following way:
update MAXMENU set position=[APP_POS]
where elementtype='APP' and keyvalue='[APP_NAME]'

Restart Maximo application.

Source:http://maximodev.blogspot.com/2010/10/editing-go-to-menu.html

Tidak ada komentar:

Posting Komentar