Maximo

 View Only

 setQBE on rel.object{attribute}

guillaume munger's profile image
guillaume munger posted Mon March 16, 2026 02:32 PM

Hi,
I am trying to perform a setQBE on an attribute that exists inside a rel.object{attribute} relationship, but I am not sure how to correctly reference it.

the attribute look like this 

      <attribute id="am36b7" name="rel.classstructure{description_class--locclassdescription}"/>

I have already attempted several approaches, such as:

  •         dsLocation.setQBE("classstructure[0].locclassdescription", "=", "Phase bâtiment")
  •         dsLocation.setQBE("locclassdescription", "=", "Phase bâtiment")
  •         dsLocation.setQBE("classstructure.locclassdescription", "=", "Phase bâtiment")

However, none of them have worked so far.

Could you please advise on the correct way to apply a QBE filter on an attribute that comes from a related object?

Thank you.

Bartosz Marchewka's profile image
Bartosz Marchewka

Hi @guillaume munger,

For RBA you can try to use classstructure.description_class but I think it will not work for real device. Even IBM implements QBE differently here for Mobile and RBA 

(could you please review an existing IBM code in SRMOBILE application).

app.xml

<maximo-datasource id="allcategoryds" object-structure="mxapitkclass" offline-immediate-download="true" lookup-data="true" saved-query="MOBILECLASSSTRUCTURE" selection-mode="single" order-by="sortorder" controller="CategoryDataController" page-size="15" can-load="{app.state.isMobileContainer||app.state.canLoad.categories}">
    <schema id="aqpwv">
      (...)
      <attribute name="rel.classusewith{objectname}" id="en5e2"/>
      <attribute name="classusewithsr" id="r_e2k">
        <attribute name="_exists--usewithsr" index="true" id="d7re7"/>
      </attribute>
      (...)
  </maximo-datasource>

CategoryCommonController:loadCategoryDS()

(...)
            //istanbul ignore next
            if (this.app.state.isMobileContainer) {
                categoryDS.setQBE('usewithsr', true);
            } else if (!this.app.client.fakeClient) {
                //Attribute inside relationship does not work for device
                categoryDS.setQBE('classusewith.objectname', '=', 'SR');
            }
(...)