Relationships from a child object would cause a new child set. Using traditional Maximo business logic, let's say you're on a WORKORDER. There's a relationship from WORKORDER->ASSET to get the Asset description. If you from the ASSET try to get data from WORKORDER (using WORKORDER.DESCRIPTION for example), it doesn't go up to the existing WO in memory. It creates a new child set of WORKORDER from ASSET. This means you have the same WO in memory inside two separate sets. Best case scenario this is inefficient, but more often it breaks things. For example, if you had a newly created WO, that work order would not even exist in the database yet to fetch. If you modify the WO in both MBOs you would get updated by another user error. And many more issues.
There is the concept of an owner MBO that you can try and traverse up (using mbo.getOwner()). Using our example above, since ASSET was opened from the WORKORDER MBO, you can go up from the ASSET back to the WO and get the in-memory version. I'm not sure that works here on advanced search being honest because these are not traditional sets.
I tried to cover this before, but I want to be explicit you should never do this on out of the box attributes. Especially with the new MAF framework, it's easy to build a UI that can support this without needing to completely break core Maximo logic.
There was also the addition of bean scripting that could potentially be used here as well. This wasn't an option before. I'd love to test this out but won't have time to get to this for a while.
------------------------------
Steven Shull
Principal Maximo Solutions Engineer
Naviam
Cincinnati OH
------------------------------
Original Message:
Sent: Fri October 17, 2025 03:08 AM
From: pavan uppalanchu
Subject: Failure Reporting Search on Work Order Tracking Advanced Search
@Steven Shull Thnaks for your inputs and suggestions. I have a very similar requirement in asset application. We have an Asset Type in Advance Seach Window.
Our requirement is to have another field ASSETATTRID and get specifications lookup based on assettype in advance search. I followed the same approach like you have mentioned above but not getting value using getQbe('attribute')
My script is written on ASSETSPEC table, Retrive list on ASSETATTRID attribute.so, I have written getQbe('ASSET.ASSETTYPE'). Is it the correct approach. I'm using oob lookup ASSETATTRIBUTE on the field.
------------------------------
pavan uppalanchu
Original Message:
Sent: Thu March 11, 2021 08:39 AM
From: Steven Shull
Subject: Failure Reporting Search on Work Order Tracking Advanced Search
Your advise Tim, specifically looking at the where clause, got me thinking and I came up with an example script. This was a pretty fun challenge as it helped teach me a way we can accomplish this, especially on custom objects. I have to reiterate (as I put in the comments of the script above) that this impacts the PROBLEMCODE attribute inside of the application so that logic would have to be reimplemented. I would probably avoid actually doing this because it's on the out of the box field but the information is still useful all the same.
The Maximo framework has the ability to retrieve the QBE for attributes. So implementing when someone has provided an = sign (meaning exact search), without having multiple values (no comma), you can then get the failure code and apply that as a filter.
# NOTE: This only handles list/advanced search. You would need to recreate the logic when it's not on the advanced searchfrom psdi.mbo import SqlFormatfrom java.lang import String# Set static attributes needed for getListrelationObject="FAILURELIST"relationWhere="failurecode=:problemcode"srcKeys=["FAILURECODE"]targetKeys=["PROBLEMCODE"]def getQbe(attribute): filter="" woSet=mbo.getThisMboSet() # Check if QBE starts with an equal sign (meaning exact) and no comma list (IE multi-value) if woSet.getQbe(attribute) and String(woSet.getQbe(attribute)).startsWith("=") and not String(woSet.getQbe(attribute)).contains(","): qbe=woSet.getQbe(attribute) # Remove equal sign qbe=qbe[1:] sqf=SqlFormat("failurecode=:1") sqf.setObject(1,"FAILURELIST","FAILURECODE",qbe) filter=sqf.format() return filterif mbo.isZombie(): # Change object to FAILURECODE as that is what is used for the lookups relationObject="FAILURECODE" whereClause="" # Try and get QBE filter for FAILURECODE to provide a better filter failureFilter=getQbe("FAILURECODE") if failureFilter: listWhere="failurecode in(select failurecode from failurelist WHERE parent=(SELECT failurelist FROM failurelist WHERE " + failureFilter+" ) and type in ( select value from synonymdomain where domainid='FAILTYPE' and maxvalue='PROBLEM') )" else: listWhere="failurecode in(select failurecode from failurelist where parent is not null and type in ( select value from synonymdomain where domainid='FAILTYPE' and maxvalue='PROBLEM') )"
------------------------------
Steven Shull
Director of Development
Projetech Inc
Cincinnati OH
Original Message:
Sent: Wed March 10, 2021 10:35 AM
From: Tim Ferrill
Subject: Failure Reporting Search on Work Order Tracking Advanced Search
I agree that there's no way to limit to just the Advanced Search, but I have had success in limiting to just the list tab, which in this case is the same thing functionally. I have seen fields with a class defined cause problems with a Retrieve List script, so that is another concern. One possible workaround is to add a non-persistent field and populate that dynamically with a Formula.
The one limitation I'm not sure about is looking back at the existing values in the Advanced Search dialog. You *might* be able to reach back to the owner and see what where clause is applied, but that's going to take some trial and error to get right if it is possible.
------------------------------
Tim Ferrill
Solutions Consultant
Intelligent Technology Solutions
tferrill@webuildits.com
www.webuildits.com
@tferrill/@webuildits
Original Message:
Sent: Wed March 10, 2021 08:13 AM
From: Steven Shull
Subject: Failure Reporting Search on Work Order Tracking Advanced Search
With an Automation Script, you can define a different filter (IE don't filter by ORGID in advanced search but filter by ORGID on a record) and you can use certain variables (such as the user, personid, etc.) but you can't retrieve a value from another field in the advanced search. It's not a real record, so doing something like mbo.getString("FAILURECODE") or utilizing it in the set (failurecode=:failurecode for example) won't work. In addition, there's no way to do it just for the Advanced Search. Creating an automation script will affect the application as well so we don't recommend doing it on out of the box fields typically.
The reason for this limitation (IMO) is they can't validate the values provided. You may have a single value (=BLDG for example) but by design that's not a real limit. Without the = sign it might be a wildcard search which would result in 0-X number of records, or you may even have a comma separated value list (=BLDG, =PIPE, =TURBINE, etc.). Making fields work in that scenario isn't possible.
There are third party products that support this but there's no way with the Maximo framework itself.
------------------------------
Steven Shull
Director of Development
Projetech Inc
Cincinnati OH
Original Message:
Sent: Tue March 09, 2021 04:28 PM
From: Mary Mangieri
Subject: Failure Reporting Search on Work Order Tracking Advanced Search
Thank you. I have the relationships set up. I will give the table domain a try.
Original Message:
Sent: 3/8/2021 5:32:00 PM
From: Tim Ferrill
Subject: RE: Failure Reporting Search on Work Order Tracking Advanced Search
The Cause/Remedy field should just be a matter of defining a relationship in Database Configuration and then configuring the field in Application Designer.
Dynamically filtering the lists could be tricky, but you may be able to make that work using Automation Scripts or potentially even Table domains.
------------------------------
Tim Ferrill
Original Message:
Sent: Thu March 04, 2021 02:12 PM
From: Mary Mangieri
Subject: Failure Reporting Search on Work Order Tracking Advanced Search
I need to add the ability to search failure reporting in work order tracking advanced search. I have the search for Failure and Problem right now, since those are on the work order table. I need a way to search for Cause and/or Remedy and find work orders where the failure reporting matches. My customer would ideally like to select Failure, then select a Problem from a list filtered by Failure, then Cause, then Remedy. Or something along those lines.
IBM suggested this could be done with an automation script?
I would appreciate any suggestions.
Thank you,
Mary
------------------------------
Mary Mangieri
Sarasota County Government
Sarasota FL
------------------------------
#AssetandFacilitiesManagement
#Maximo