Monday, 1 April 2019

Add Default Value to Lookup for Filtering | IBM Maximo



Export Lookup.xml

find lookup table tag and just paste default value tag into it, see below example:

    <table id="laborcraftrate" inputmode="readonly" selectmode="single">
        <tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="laborcraftrate_lookup_tablebody">
            <tablecol dataattribute="orgid" id="laborcraftrate_lookup_tablebody_col_1" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
            <defaultvalue dataattribute="contractnum" defaulttype="query" id="laborcraftrate_lookup_tablebody_default" value="BEDFORD"/>
        </tablebody>
    </table>
import lookup.xml again.

we are done :)

1 comment:

  1. I like this approach over a where clause because it gives you the flexibility of removing that filter value if you want to search on other records. It is nice to have a default value for most searches.

    ReplyDelete