Most conditions that users write get executed against dummy_table or the corresponding database table as actual SQL. There are substitution variables, so there is some overhead that the framework has to do to parse out the logged in user for example or the value in a particular field. That's when the conditional expression type is "Expression".
But conditions can be java classes (and automation scripts, which use a java class to launch your script). For example, BMXCREWID is a condition that uses a java class to determine if it should evaluate to true/false.
Because of the substitution variables and java classes, it didn't seem likely that it would evaluate the condition in report object structure scenarios. But when you're retrieving data from the REST API you're interacting with MBOs so it can easily evaluate the condition logic.
------------------------------
Steven Shull
------------------------------
Original Message:
Sent: Wed September 22, 2021 02:03 AM
From: User1971
Subject: Exclude rows from object structures via WHERE clause
Thanks Steven. That's good to know.
Question:
In a previous comment about the RESTRICTWHERE field, you mentioned:
"…conditions can not always be converted to SQL."
Would you be able to expand on that point? Are conditions not written in real SQL?
Thanks.
Original Message:
Sent: Mon September 20, 2021 08:24 AM
From: Steven Shull
Subject: Exclude rows from object structures via WHERE clause
I always recommend creating a new object structure instead of trying to change the existing. Most people don't realize this but changes to an object structure will prevent users from modifying any QBR based on it and existing reports would keep the logic you don't want (so it'd only help with new QBRs).
Modifying existing object structures can also cause issues. There's a parent child hierarchy that gets built and a lot of time they look for the reference they expect (such as WORKORDER in this case) and if it's no longer part of the object structure the updatedb will fail. There are other issues too like their updatedb could add something back or remove something you added. It's typically easier and more reliable just to create your own (duplicating existing when possible).
------------------------------
Steven Shull
Original Message:
Sent: Sat September 18, 2021 03:36 PM
From: User1971
Subject: Exclude rows from object structures via WHERE clause
Regarding query-based reporting / ad-hoc reporting using the REP_WOPLANACT object structure:
I wonder if I could change that object structure so that it uses a view instead of the WORKORDER table. I could give the view a WHERE clause to exclude tasks: ISTASK=0.
#Maximo
#AssetandFacilitiesManagement