Maximo Open Forum

 View Only

 Automation Script Queries with sqp: Params Working in Role-Based Apps but Failing in Maximo Mobile (MAS 9.0)

Jump to  Best Answer
  • Customizations
  • Maximo Application Suite
  • Mobility
SHAKTI BISWAL's profile image
SHAKTI BISWAL posted 04-05-2026 08:40

Hello Maximo Experts,

I have a requirement to fetch latest 10 WOs for an assetnum input from a mobile search page. As the number of such WOs can be large, I created an automation script based query and made that available thru the object structure.

Environment:

  • Platform: Maximo Application Suite (MAS) 9.0

  • App: Native Maximo Mobile (e.g., Work Order Tracking / Technician)

  • Query Method: Object Structure Automation Script (Query type)

  • Parameterization: Using saved-query-param / sqp: prefix

The Problem: I have implemented an Automation Script-based query on a clone of standard Object Structure (e.g., MXAPIWODETAIL). The script is designed to accept dynamic parameters using the sqp: syntax.

When testing via the Role-Based App (Web version) or direct REST API calls, the query works perfectly. The script executes, consumes the parameters, and returns the filtered data set.

However, when I attempt to use this same query within the Technician Maximo Mobile app, it fails to return data or ignores the parameters entirely. It seems the Offline Sync Engine in the mobile shell handles these requests differently than the standard web-based OSLC provider.

What I’ve Verified:

  1. The Automation Script is registered correctly in the Query Definition of the Object Structure.

  2. The query is marked as Public.

  3. The browser-based Role-Based app (which uses the same OSLC resources) works as expected.

The Question: Is there a specific configuration required in the app.xml (MAF) to force the native mobile sync engine to pass sqp: parameters to the server? Does the native Maximo Mobile framework support saved-query-param for script-based queries, or is this restricted to standard SQL-based saved queries?

Any guidance on the XML syntax or required maximo-datasource settings for MAS 9.0 would be greatly appreciated.

Current <maximo-datasource> definition given below:

<maximo-datasource cache-expiry-ms="1" id="woAssetHistoryDS" object-structure="HALMOBWODETAIL" saved-query="OSQUERY.HALMOBWODETAIL.HALLATEST10WO" saved-query-params="{{'assetnum': ''}}" page-size="10" pre-load="false" notify-when-parent-loads="false" selection-mode="single" order-by="targcompdate desc">
    <schema id="a1_hiswo">
      <attribute id="a1_hiswo1" name="wonum"/>
      <attribute id="a1_hiswo2" name="description"/>
      <attribute id="a1_hiswo3" name="assetnum"/>
      <attribute id="a1_hiswo4" name="targcompdate"/>
      <attribute id="a1_hiswo5" name="wopriority"/>
      <attribute id="a1_hiswo6" name="worktype"/>
      <attribute id="a1_hiswo7" name="siteid"/>
      <attribute id="a1_hiswo8" name="location"/>
      <attribute id="a1_hiswo9" name="statusdate"/>
      <attribute id="a1_hiswo10" name="status"/>
      <attribute id="a1_hiswo11" name="status_description"/>
    </schema>
    <maximo-datasource-override id="halwoAssetHistoryDS" saved-query="OSQUERY.HALMOBWODETAIL.HALLATEST5WOS" saved-query-params="{{'assetnum': ''}}" selection-mode="single" page-size="5"/>
    <maximo-datasource-override id="halwoLocationHistoryDS" saved-query="OSQUERY.HALMOBWODETAIL.HALLATEST5WOS" saved-query-params="{{'location': ''}}" selection-mode="single" page-size="5"/>
  </maximo-datasource>

Steven Shull's profile image
Steven Shull  Best Answer

In Maximo Mobile, data is retrieved & sent via the Navigator primarily using what's called a mobile schema (/maximo/oslc/graphite/mobile/schema). It's designed to fetch the data up front for all the applications & then operate primarily offline. Once data has been downloaded, by default, it will not go back to the server without some other action triggering it (such as a forceSync()). 

In your example, your data is dynamic at run-time, so the traditional design doesn't work. There is a concept called mobile-server-search that can be set on the datasource to indicate that it's fetched from the server at run-time and will be limited in the fetch to the page-size defined on the datasource. IE if your page-size is 10, it will only fetch 10 records. You could use the setQBE to set the assetnum, location, etc. criteria that would then be executed on the server. 

Unrelated to your use case, you should NOT mix and match object structures for the same data type (WORKORDER in this case). Mixing HALMOBWODETAIL & MXAPIWODETAIL for example will cause problems with the app unless you get really complicated. There was some functionality built for ACM's application to utilize different object structures for the same dataset but it's more complex and not really documented. 

SHAKTI BISWAL's profile image
SHAKTI BISWAL

Thanks Steven.

I have implemented the suggested change and can verify that it's downloading just 10 records from the server.

Regards

Shakti