• 1.  Lookup values not being displayed

    Posted Wed September 28, 2022 10:09 AM


    I am trying to learn Maximo Anywhere 7.6.4 and have followed the sparse tutorials that I can find.

    I am trying to add a custom domain for an attribute but am getting "No records to display" when clicking on select value in the app. The domain works fine in Maximo Asset Management showing values correctly.

    Steps taken:

    1. Create ALN Domain RISKDOMAIN, Datatype=ALN, Values=HIGH, MEDIUM, LOW, Length=10
    2. Make sure the attribute WORKORDER.RISK exists in Maximo, Type=ALN, Length=10, Domain=RISKDOMAIN, Search Type=EXACT
    3. Make sure RISK exists in the OSLC Resource Shape document, oslc-docs/resources/rdf/oslc/shapes/oslcdetail/oslcdetail

    <oslc:occurs rdf:resource=""/>
    <oslc:propertyDefinition rdf:resource=""/>
    <oslc:valueType rdf:resource=""/>
    <dcterms:title rdf:datatype=""
    >Risk Assessment</dcterms:title>

    4. Add the attribute to the Work Order resource in app.xml:


    <data id="data">

    <!--Work Order resource-->

    <resource class="" defaultOrderBy="wonum asc"
    describedBy="" hasManagedQuery="true" id="workOrder"
    name="workOrder" pageSize="20" providedBy="/oslc/sp/WorkManagement">

    <attributes id="workOrder_attributes">
    <attribute name="risk" describedByProperty="spi_wm:risk" id="workOrder_risk_spiwm_risk"/>

    5. Create domain resource in <data> section of app.xml

    <data id="data">
    <!-- DOMAINS Resources -->

    <!-- RISK DOMAIN -->
    <resource additionalData="true"
    id="domainRisk" name="riskDomain" pageSize="10" providedBy="/oslc/sp/SmarterPhysicalInfrastructure">

    <attributes id="domainrisk_attributes">
    <attribute describedByProperty="spi:value" id="domainrisk_value_spivalue" name="value"/>
    <attribute describedByProperty="spi:description" id="domainrisk_description_dctermstitle" name="description"/>
    <attribute describedByProperty="spi:domainid" id="domainrisk_domainid_oslcshortTitle" name="domainid"/>
    <attribute describedByProperty="spi:alndomainid" id="domainrisk_alndomainid_alndomainid" name="alndomainid"/>
    <queryBases id="domaingetrisk_queryBases">
    <queryBase id="domaingetrisk_queryBase_getrisk" name="getRisk" queryUri="/oslc/os/oslcalndomain"/>
    <whereClause clause="spi:domainid='RISKDOMAIN'" id="domaingetRisk_whereClause"/>

    6. Create lookup in <ui> section
    <ui id="ui">
    lookup id="WorkExecution.RiskLookup" label="Select Risk Level" resource="riskDomain">
      <requiredResources id="WorkExecution.RiskLookup.reqRess">

        <requiredResource id="WorkExecution.reqRes" name="riskDomain" />
      <list id="WorkExecution.RiskLookup.list" resource="riskDomain">
        <listItemTemplate id="WorkExecution.RiskLookup.listItemTemplate" layout="Item1Desc1">
          <listtext id="WorkExecution.RiskLookup.list_value" resourceAttribute="value" layoutInsertAt="item1" cssClass="bold textappearance-medium" />
          <listtext id="WorkExecution.RiskLookup.list_description" resourceAttribute="description" layoutInsertAt="desc1" cssClass="bold textappearance-medium" />
      <returnAttributes id="WorkExecution.RiskLookup.returnAttrs">
        <returnAttribute id="WorkExecution.RiskLookup.return_value" sourceAttribute="value" targetAttribute="risk" />
        <returnAttribute id="WorkExecution.RiskLookup.return_descr" sourceAttribute="description"


    7. Add field to the app view

    <ui id="ui">

    <!--Work Order Details view-->
    <view id="WorkExecution.WorkDetailView" label="Work Order Details" resource="workOrder">


      <container id="WorkExecution.WorkDetailView_workOrder_container_0" resource="workOrder">

        <group id="WorkExecution.WorkDetailView_group_0">

    <groupitem id="WorkExecution.WorkDetailView_workOrder_groupitem_WorkExecution.RiskView">
    <text id="WorkExecution.WorkDetailView_workOrder_groupitem_WorkExecution.RiskViewText" resourceAttribute="risk" label="Risk" editable="true" placeHolder="Tap to enter" lookup="WorkExecution.RiskLookup" lookupAttribute="risk" />

    The field with the magnifying glass is visible and displays label and value, but the lookup is empty. Have tried modifying but do not know how to debug.

    Very grateful for any help with this.

    Best wishes,

    John Venkiah


    John Venkiah


  • 2.  RE: Lookup values not being displayed

    IBM Champion
    Posted Thu September 29, 2022 07:41 AM
    HI John,

    I've reviewed the work several times and I can't see where the issue is, and I the one that put together the IBM online version of Maximo Anywhere training course.

    The simplest reference is this one: -->

    As you have siad the:
    • Field on the work order resource and can be seen in the OSLC docs
    • Domain is working in Maximo
    • The lookup is display, but with zero data
    Typically, if everything else is working, then there is two things to look at:
    1. The whereCause is actually correct, which it looks to be
    <whereClause clause="spi:domainid='RISKDOMAIN'" />

    2. You haven't refreshed the lookup date.  Please go to the Settings menu and refresh both the System Data and the Lookup data, though only the lookup data should be enough.  The reason for this refresh is that although you've added the lookup the ALNDOMAIN additional data i.e. the lookup data has not received the new data.  It does not get pushed until the timeframe, usually, 30 days is up.  It's an entirely new resource.  Once the refresh is done, you can add new data and it will be picked up.

    Craig Kokay,
    Lead Senior Maximo/IoT Consultant

    Sydney, NSW, Australia
    Ph: 0411-682-040

  • 3.  RE: Lookup values not being displayed

    Posted Thu September 29, 2022 10:23 AM

    Hej Craig,

    Thanks for your reply. I got some help from a college and found out that it was indeed the retrieval of new lookup data in the app that was necessary. I tested to reset all code to initial state and many more lookup fields failed to collect data. Collecting in the app solved the problem.

    Best wishes,


    John Venkiah