Dialog with it's own datasrc has save button disabled when list tab is empty
Maximo 7.6.1.3
I created a dialog on the ASSET application with it's own datasrc. The dialog has three buttons:
mxevent="save" - Save contents of dialog without closing dialog
mxevent="dialogok" - Save contents of dialog and close dialog
mxevent="dialogcancel" - Do not save and close dialog
All three buttons work fine when there is data on the list tab of the ASSET application. However, the Save button is disabled when there is no data on the list tab. The other two buttons work just fine with an empty list tab.
How do I enable the Save button when the list tab is empty?
Can the Save button can be conditionally enabled as soon as data is modified on the dialog?
<datasrc id="casddatasrc" mboname="ASSET" whereclause="trkmnhst = 'Y' and siteid = (select defsite from maxuser where userid = :user)"/>
<dialog datasrc="casddatasrc" id="casd" label="CAS" savemode="ONUNLOAD" width="1200">
<section id="tas_s1">
<table id="tas_s1_table1" inputmode="readonly" label="Tracked Assets" ondatachange="refreshtable" orderby="isrunning" relationship="CASASSETS">
<tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="tas_s1_table1_tb1">
<tablecol dataattribute="ASSETNUM" id="tas_s1_table1_tb1_tc1" sigoption="ASSETFLD"/>
<tablecol dataattribute="ISRUNNING" id="tas_s1_table1_tb1_tc2" label="Up"/>
<tablecol dataattribute="DESCRIPTION" id="tas_s1_table1_tb1_tc3" label="Description"/>
<tablecol dataattribute="EQ2" id="tas_s1_table1_tb1_tc4" label="Building"/>
<tablecol dataattribute="AS61" id="tas_s1_table1_tb1_tc5" label="Local ID"/>
</tablebody>
</table>
</section>
<buttongroup id="tas_buttons">
<pushbutton default="true" id="tas_buttons_b1" label="Save" mxevent="save"/>
<pushbutton default="true" id="tas_buttons_b2" label="Save/Close" mxevent="dialogok"/>
<pushbutton id="tas_buttons_b3" label="Cancel" mxevent="dialogcancel"/>
</buttongroup>
</dialog>
------------------------------
Andrew Jackson
------------------------------