We use the MXAPITKCLASS object structure and MOBILECLASSSTRUCTURE query for ASSET & SRMOBILE which means you need to use that in your app to keep consistent. I'm not a fan of the object structure name, especially because we have MXAPICLASSSTRUCTURE that we should have used instead. But lookup data can only be downloaded once for mobile for the same main object (CLASSSTRUCTURE in this case). To not negatively impact the out of the box apps, you need to use this same query & object structure.
You can use a mobile-qbe-filter and where clause on your datasource so that it only shows the classifications relevant for Work Order. Look at the Mobile Overview page in the Developer documentation where I walk through this for a different example.
Regarding "Or can I just have the attribute in dswolist and use that as the datasource?", unfortunately, we don't have a great way to show the filter based on the data that resides in the list today. At the most basic level, you would have duplicate results if you had multiple records with the same value. For example, if you had 10 Work Orders that were classified the same way, you'd see the same classification 10 times to pick from. I'm also not sure whether you could dynamically bind the filter either since the list page could have one of dozens (if not more) datasources in the drop down. It's possible it would work (using {page.state.selectedDS}) but not something I've seen done so it may have issues.
Supporting filters for attributes that would not have a value list (date fields, description fields, etc.) are enhancements that I know we've talked about. We have an idea for the date range (https://ibm-ai-apps.ideas.ibm.com/ideas/MASMOBILE-I-544).
But I'm not aware of an idea to be able to use the datasource to get distinct list of values back. This is challenging from a technical perspective because we need to support distinct behaviors in the web & mobile. And in most scenarios, we don't normally load all the records in the datasource so we don't have the values. But this would be a good feature if we can get it implemented. I'd recommend opening an idea if it's important to you
Original Message:
Sent: Mon December 16, 2024 08:16 AM
From: Christopher Stewart
Subject: Questions regarding data and filtering in MAS 9 Mobile
Thanks for the info! So if I want to do a filter for CLASSSTRUCTURE.HIERARCHYPATH for work orders, would I need to set up a datasource for classstructure? Then reference that with the lookup attribute from within dswolist? Or can I just have the attribute in dswolist and use that as the datasource?
------------------------------
Christopher Stewart
Original Message:
Sent: Fri December 13, 2024 10:15 AM
From: Steven Shull
Subject: Questions regarding data and filtering in MAS 9 Mobile
The lookup-map is correct, but I would NOT try to use the lookups.json approach. Unless the changes we made in 9.0 resolve this, this isn't possible for customers because the config tool build process won't have the lookup loaded and will throw an error when you reference a lookup name that the config tool has loaded. In reality, you don't need this approach at all though and it leads to downloading redundant & potentially bad data.
Instead of name="", use datasource="" and reference the datasource that you have defined in your application. This should be done with a maximo-datasource-override over your existing datasource to not impact behavior of the other apps. For example, to do the asset filter we define this datasource override on the assetLookupDS:
<maximo-datasource-override id="assetFilterDS" selection-mode="multiple"/>
Then we define the lookup-map like this on the dswolist datasource
<attribute id="j6w_q" name="assetnum" searchable="true">
<lookup-map datasource="assetFilterDS" id="w9e2y" name="asset">
<lookup-return datasource-field="assetnum,description" id="yk9nw" lookup-field="displayValue"/>
<lookup-return datasource-field="assetnum" id="qmgmg" lookup-field="value"/>
</lookup-map>
</attribute>
NOTE: While we reference name="", this is NOT needed and will cause issues if the name doesn't exist. This should be left off in your filters.
------------------------------
Steven Shull
Original Message:
Sent: Fri December 13, 2024 02:34 AM
From: Andrey Ilinskiy
Subject: Questions regarding data and filtering in MAS 9 Mobile
It is also not a big problem. You need to add for the attribute defenition to the maximo-data-source lookup-map defenition
<attribute id="gqb8q" name="siteid"> <lookup-map id="zynjx" name="cxsite"> <lookup-return datasource-field="description,siteid" id="xk98y" lookup-field="displayValue"/> <lookup-return datasource-field="siteid" id="eqrw4" lookup-field="siteid"/> </lookup-map> </attribute>
to create a new lookup you can do it in 2 ways:
- Define it in JavaScript in AppCustomization.js
- Create lookups.json in src folder and define lookup there.
Maximo will use all attributes with lookup-map as filter options.
More information about it can find in MAF documentation in your MAF-tools instance by link http://localhost:3001/maximo-app-framework/graphite-documentation/public/patterns/lookups
------------------------------
Andrey Ilinskiy
Handz.on
https://www.on.de/
München
Original Message:
Sent: Fri December 06, 2024 12:16 PM
From: Christopher Stewart
Subject: Questions regarding data and filtering in MAS 9 Mobile
1.) Is there a way in Maximo Mobile 9 to not download images to the mobile app? I see there is an attachments checkbox in the setting snow, but are images different from attachments? What I would like to do is not download any images to the IPAD for offline viewing. Ideally if they are connected online it would be great to download the images as needed. Can you do this with the child record retrieval?
2.) I want to add a custom filter to the technician app to filter work orders on ticket template. How do you define custom filters? I see there are a few for asset, location, work type etc. I couldn't find where new ones are added though.
3.) When I click the check for updates button in technician it takes a bit to update and finish. If I go into the settings and check only sync delta it goes much faster. Is there a way to have this delta option toggled by default so all of your technicians would not have to set that?
Thanks! Any info is appreciated.
------------------------------
Christopher Stewart
------------------------------