Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
I am using Windchill 10.1 M040, and attempting to determine how many objects (parts, documents, epmdocs, whatever) are in each of my products.
I am thinking querybuilder can do this, but the count function gives me an error "A statement with aggregate function can not be used with access control."
Has anyone built such a query (and can share)?
Jeff, Below Query will give you all object types by count in every Product Context by folder name:
SELECT b.total_objects,b.CLASSNAMEKEYROLEBOBJECTREF, subfolder.name, pdmlinkproduct.namecontainerinfo
FROM subfolder,
pdmlinkproduct,
(SELECT Count(*) total_objects, ida3a5,CLASSNAMEKEYROLEBOBJECTREF
FROM iterfoldermemberlink
WHERE classnamekeyroleaobjectref = 'wt.folder.SubFolder'
GROUP BY ida3a5,iterfoldermemberlink.CLASSNAMEKEYROLEBOBJECTREF) b
WHERE subfolder.ida2a2=b.ida3a5 AND subfolder.ida3containerreference=pdmlinkproduct.ida2a2
ORDER BY namecontainerinfo;
Hi Jeff,
your question is still valid. I hoped to find how many CAD documents existed per context, and what was the latest modified date of those documents.
I am sure all this information is available in the database, but how on earth can I build this query ?
I'm using a newer version of Windchill, but I think it would be similar. Look for a checkbox on the query builder to "bypass access control"
