When you load your custom table in Database Configuration and go to the Relationships tab, do you see a relationship with a Name of WORKORDER? The Child Object field for that relationship should also be set to WORKORDER. On your custom table, I assume there are WONUM and SITEID attributes, so the Where Clause should be wonum = :wonum and siteid = :siteid, where Maximo will replace :wonum and :siteid with those bits of data from the current record in your custom table.
In your expression, your reference to WORKORDER.WORKTYPE is unbound -- it is missing the leading colon : that tells Maximo to use data from the current record. Corrected, that condition will be :WORKORDER.WORKTYPE <> 'CM'.
I hope that helps.
------------------------------
Blessings,
Jason Uppenborn
Cohesive
------------------------------
Original Message:
Sent: 08-07-2025 16:19
From: Rod Sprouse
Subject: Making a field required based on Y/N across two table
Hi, struggling to get this to work. Request is to have a Y/N question on a workorder that makes a field required on a custom table if the answer is yes(1) and the worktype is CM. Have tried the guide to create cond expression, then use attribute restrictions but get an error that there is no relationship between the tables. However I see the relationship. My expression is WORKORDER.WORKTYPE<>'CM' AND :WORKORDER.TRI_CMFAILMODET='1'
Have also tried an automation script, however that is not working at all.
Any help is appreciated.
#MaximoApplicationSuite
------------------------------
Rod Sprouse
Targa Resources
------------------------------