Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Show Catagory Attributes For All Documents
Ahmad_Rahman_(ahmad@edms.com.my_(Delete)_3384722)
Hi,Let say I had associated a folder with a certain category, and all documents inside that particular folder had values for all attributes of that category, then how are we going to list out the attributes value using LR.For example:DocName Attr1 Attr2 Attr3-----------------------------------a.jpg 1 True Drawingb.dwg 3 False Designc.gif 5 True PictureAny thoughts. Thanks.
Find more posts tagged with
Comments
Roger_McCoy
Ahmad,If I understand your question, the example below should work (we're running on Oracle). Note: this query returns documents in all folders, not just one specific folder. First, you'll need to determine the 'DefID' (ObjectID) value of your category (e.g. 8801)... you can do this by hovering over the category link and looking at the URL. Also, 'Self Joins' are used to extract more than one attribute (e.g. Location, Security Classification)... you may need to create more.SELECT dtree.name AS Name, dtree.dataid, dtree.versionnum AS Version, A.valstr "Location", B.valstr "Security Classification" FROM dtree, llattrdata A, llattrdata B WHERE (dtree.dataid = A.id AND dtree.versionnum = A.vernum AND A.defid = 8801 AND A.attrid = 3) AND (dtree.dataid = B.id AND dtree.versionnum = B.vernum AND B.defid = 8801 AND B.attrid = 4) ORDER BY dtree.dataidExample:Security Category=======================================NAME DATAID VERSION Location Security Classification file_a 11542 1 Cabinet 1 Internal Use Only file_b 11553 2 Cabinet 2 Internal Use Only file_ c 11564 5 Cabinet 2 Internal Use Only Hope this helps!