Maximo Open Forum

 View Only

 Query for work orders with Comm Logs

Jump to  Best Answer
  • Reporting
Gregory Butler's profile image
Gregory Butler posted 06-05-2023 14:20

I'm trying to query in Maximo for work orders that have comm logs that used specific comm templates. Hoping to get some assistance with why the query below is not pulling results.

Querying in work order tracking:

exists (select 1 from commlog where templateid = 'CIR' and workorder.workorderid = commlog.commlogid)

If anyone has other thoughts on how to query for work orders with comm logs I would greatly appreciate any input.

Dragos Chitu's profile image
Dragos Chitu  Best Answer

Few things that I noticed:

  • templateid is a non-persistent field and I couldn't use it in the Where clause;
  • to link workorder and commlog tables I used workorder.workorderid = commlog.ownerid;
  • I'm not sure how to link directly commtemplate with commlog... in my case I should link workorder <-> commlog <-> escalation <-> commtemplate.

Hope it helps.