IBM Support

How to disable 'Delete Row' button in the 'View Attachments' dialog

Technical Blog Post


How to disable 'Delete Row' button in the 'View Attachments' dialog



If you want to disable 'Delete Row' button in the 'View Attachments dialog' depending on the workorder's status, you can follow below idea.


At first,  'View Attachments dialog' definition is existed in library.xml  because this dialog is used commonly for some applications.

So, if you want to limit the scope for only WOTRACK application, you may need to have own 'View Attachments dialog' definition in WOTRACK application.


Requirement : 'Delete buttion' is shown only when workorder's status is WAPPR in the 'View Attachments dialog'.

Please follow below steps.

1. Go to the Conditional Expression Manager application.

- Create a condition

Condition -> 1015


Expression  ->  :STATUS = 'WAPPR'



2. Go to the Application Designer application

- Open WOTRACK app

- Select Action - Add/Modify Signature Options

  Option : DELCONTROL 


- Ok

3. Export application designer file as wotrack.xml  and open it

- add below section into wotrack.xml

    <dialog id="viewattachments" label="View Attachments for wo" savemode="ONLOAD">
        <table id="viewattachments_table" inputmode="readonly">
            <tablebody id="viewattachments_tablebody">
                <tablecol dataattribute="document" id="viewattachments_table_tablebody_4" label="Document" type="openurl" urlattribute="weburl"/>
                <tablecol dataattribute="docinfo.description" id="viewattachments_table_tablebody_6" label="Description" sortable="false"/>
                <tablecol dataattribute="doctype" id="viewattachments_table_tablebody_3" label="Document Folder"/>
                <tablecol dataattribute="docversion" id="viewattachments_table_tablebody_5" label="Document Version"/>
                <tablecol dataattribute="printthrulink" id="viewattachments_table_tablebody_9" label="Print"/>
                <tablecol dataattribute="ownertable" id="viewattachments_table_tablebody_1" label="Application"/>
                <tablecol filterable="false" id="viewattachments_table_tablebody_7" mxevent="linkproperties" mxevent_desc="Attachment Properties" mxevent_icon="img_information.gif" sortable="false" type="event"/>
                <tablecol filterable="false" id="viewattachments_table_tablebody_8" mxevent="instantdelete" mxevent_desc="Delete Row" mxevent_icon="btn_delete.gif" sigoption="DELCONTROL" sigoptiondatasrc="MAINRECORD" sortable="false" type="event"/>
        <buttongroup id="viewattachments_2">
            <pushbutton default="true" id="viewattachments_2_1" label="OK" mxevent="dialogok"/>

- Save wotrack.xml and reimport it.

p.s :  you may see invalid binding in the Application Designer/Edit Dialog.  ( can be ignored )


4. Go to the Security Groups - Open your group

ex. MAXADMIN group.

- Click Applications Tab - Find WOTRACK application

- Find the option created in the step 2.

- Then, grant access and put condition number (1015) created in the step 1.




5. Log into Maximo using a user belonging to MAXADMIN group.

6. Go to the WOTRACK application

- Open a  WO whose status is WAPPR

- Attach an attachment

- Click 'View Attachment'

Then, you can see 'Delete Button'  in the View Attachments Dialog



- Open a  WO whose status is APPR

- Attach an attachment

- Click 'View Attachment'

Then, you cannot see 'Delete Button'  in the View Attachments Dialog.   Delete action is not allowed for any WO whose status is not WAPPR.





[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]