Maximo Open Forum

 View Only

 How to pull record numbers for Attachments - Maximo 7.6.1

Jump to  Best Answer
  • Everything Maximo
  • Maximo User Groups
  • Reporting
Bob Kraus's profile image
Bob Kraus posted 10-02-2024 16:58

Hi All,

I want to pull a report that shows the attachment, its path and the record number that it is attached to.

Right now I can get the Application (doclinks.ownertable) and the path (docinfo.urlname) but must be missing another table that links that part.

Anyone know where I can find the "missing link" that can get me the Asset Number or Work Order number?

Niv Geo's profile image
Niv Geo  Best Answer

Extracted from a report we use. May be helpful. SQL Code (MS SQL)

select d.ownertable, isNull(l.location, isNull(j.jpnum, isNull(a.assetnum, w.wonum ))) recordnum,  d.document, d1.description, d1.urltype, d1.urlname, d.ownerid, d.doctype 
 from doclinks d
    inner join docinfo d1 on d.docinfoid = d1.docinfoid
    left outer join ASSET a on d.ownerid = a.assetid and d.ownertable='ASSET'
    left outer join WORKORDER w on d.ownerid = w.workorderid and d.ownertable='WORKORDER'
    left outer join JOBPLAN j on d.ownerid = j.jobplanid and d.ownertable='JOBPLAN'
    left outer join LOCATIONS l on d.ownerid = l.locationsid and d.ownertable='LOCATIONS'
order by d.ownertable, d.ownerid