{"id":4187,"date":"2022-01-25T10:08:37","date_gmt":"2022-01-25T09:08:37","guid":{"rendered":"https:\/\/help.r2docuo.com\/knowledge-base\/categorycount-function-document-count-of-a-category\/"},"modified":"2023-11-06T09:20:51","modified_gmt":"2023-11-06T08:20:51","slug":"categorycount-function-document-count-of-a-category","status":"publish","type":"ht_kb","link":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/","title":{"rendered":"categoryCount function &#8211; Document count of a category"},"content":{"rendered":"<p>This function allows, from a formula, to obtain the number of documents of any Docuo category. It is not necessary that the category indicated is related to the one that contains the formula.<\/p>\n<p>The categoryCount function is only <strong>available in Docuo Enterprise.<\/strong><\/p>\n<p>For example, if we have a category of countries (PAI &#8211; Country) and we want to count them from any formula, we must use this function:<\/p>\n<div style=\"padding: 1em; border: 1px dashed #2f6fab; color: black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.8em;\"><tt>Document.categoryCount(Category,[Condici\u00f3n] )<br \/>\n<\/tt><\/div>\n<p>Where:<\/p>\n<p><strong>Category<\/strong> : is the code, the name or the code &#8211; name of the category from which we want to extract the data:<\/p>\n<div style=\"padding: 1em; border: 1px dashed #2f6fab; color: black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.8em;\"><tt>'PAI'<\/tt><\/div>\n<p><strong>Condition<\/strong> : This is an optional parameter with a T-SQL condition text string of the same type used in dropdown lists. It allows us to filter the documents. For example, to filter <em>Countries<\/em> in Europe or Asia:<\/p>\n<div style=\"padding: 1em; border: 1px dashed #2f6fab; color: black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.8em;\"><tt><tt>\"&lt; @PAI:Data:Continent&gt;<\/tt> = 'Europe' OR <tt>&lt;<tt>@PAI:Data:Continent<\/tt>&gt; = 'Asian'\"<\/tt><\/tt><\/div>\n<p>Finally, the <strong>final formula<\/strong> would look like:<\/p>\n<div style=\"padding: 1em; border: 1px dashed #2f6fab; color: black; background-color: #f9f9f9; line-height: 1.1em; font-size: 0.8em;\"><tt>Document.categoryAgg(<tt>'PAI'<\/tt>, \"<tt><tt>&lt;@PAI:Data:Continent&gt;<\/tt> = 'Europe' OR <tt>&lt;<tt>@PAI:Data:Continent<\/tt>&gt; = 'Asian'\"<\/tt><\/tt>)<\/tt><\/div>\n<p>The function would return the total number of countries in Europe and Asia.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This function allows, from a formula, to obtain the number of documents of any Docuo category. It is not necessary that the category indicated is related to the one that contains the formula. The categoryCount function is only available in Docuo Enterprise. For example, if we have a category of&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"content-type":"","footnotes":""},"ht-kb-category":[62],"ht-kb-tag":[83],"class_list":["post-4187","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-functions-javascript","ht_kb_tag-docuo-enterprise"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>categoryCount function - Document count of a category - R2 Docuo | Help center<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"categoryCount function - Document count of a category - R2 Docuo | Help center\" \/>\n<meta property=\"og:description\" content=\"This function allows, from a formula, to obtain the number of documents of any Docuo category. It is not necessary that the category indicated is related to the one that contains the formula. The categoryCount function is only available in Docuo Enterprise. For example, if we have a category of...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/\" \/>\n<meta property=\"og:site_name\" content=\"R2 Docuo | Help center\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-06T08:20:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png\" \/>\n\t<meta property=\"og:image:width\" content=\"845\" \/>\n\t<meta property=\"og:image:height\" content=\"564\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@R2Docuo\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/categorycount-function-document-count-of-a-category\\\/\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/categorycount-function-document-count-of-a-category\\\/\",\"name\":\"categoryCount function - Document count of a category - R2 Docuo | Help center\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/categorycount-function-document-count-of-a-category\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/categorycount-function-document-count-of-a-category\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Post-type-Guias-de-usuario.png\",\"datePublished\":\"2022-01-25T09:08:37+00:00\",\"dateModified\":\"2023-11-06T08:20:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/categorycount-function-document-count-of-a-category\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/categorycount-function-document-count-of-a-category\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/categorycount-function-document-count-of-a-category\\\/#primaryimage\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Post-type-Guias-de-usuario.png\",\"contentUrl\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Post-type-Guias-de-usuario.png\",\"width\":845,\"height\":564},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/categorycount-function-document-count-of-a-category\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/help.r2docuo.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"categoryCount function &#8211; Document count of a category\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#website\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/\",\"name\":\"R2 Docuo | Help center\",\"description\":\"Todos los recursos para usuarios, administradores y desarrolladores de de R2 Docuo a tu alcance\",\"publisher\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/help.r2docuo.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#organization\",\"name\":\"R2 Docuo | Help center\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/ILUDEST_CENTRODEAYUDA.png\",\"contentUrl\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/ILUDEST_CENTRODEAYUDA.png\",\"width\":1200,\"height\":630,\"caption\":\"R2 Docuo | Help center\"},\"image\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/R2Docuo\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/r2docuo\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"categoryCount function - Document count of a category - R2 Docuo | Help center","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"categoryCount function - Document count of a category - R2 Docuo | Help center","og_description":"This function allows, from a formula, to obtain the number of documents of any Docuo category. It is not necessary that the category indicated is related to the one that contains the formula. The categoryCount function is only available in Docuo Enterprise. For example, if we have a category of...","og_url":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/","og_site_name":"R2 Docuo | Help center","article_modified_time":"2023-11-06T08:20:51+00:00","og_image":[{"width":845,"height":564,"url":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@R2Docuo","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/","url":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/","name":"categoryCount function - Document count of a category - R2 Docuo | Help center","isPartOf":{"@id":"https:\/\/help.r2docuo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/#primaryimage"},"image":{"@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/#primaryimage"},"thumbnailUrl":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png","datePublished":"2022-01-25T09:08:37+00:00","dateModified":"2023-11-06T08:20:51+00:00","breadcrumb":{"@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/#primaryimage","url":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png","contentUrl":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png","width":845,"height":564},{"@type":"BreadcrumbList","@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/categorycount-function-document-count-of-a-category\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/help.r2docuo.com\/"},{"@type":"ListItem","position":2,"name":"categoryCount function &#8211; Document count of a category"}]},{"@type":"WebSite","@id":"https:\/\/help.r2docuo.com\/#website","url":"https:\/\/help.r2docuo.com\/","name":"R2 Docuo | Help center","description":"Todos los recursos para usuarios, administradores y desarrolladores de de R2 Docuo a tu alcance","publisher":{"@id":"https:\/\/help.r2docuo.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/help.r2docuo.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/help.r2docuo.com\/#organization","name":"R2 Docuo | Help center","url":"https:\/\/help.r2docuo.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.r2docuo.com\/#\/schema\/logo\/image\/","url":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2023\/06\/ILUDEST_CENTRODEAYUDA.png","contentUrl":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2023\/06\/ILUDEST_CENTRODEAYUDA.png","width":1200,"height":630,"caption":"R2 Docuo | Help center"},"image":{"@id":"https:\/\/help.r2docuo.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/R2Docuo","https:\/\/www.linkedin.com\/company\/r2docuo"]}]}},"_links":{"self":[{"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb\/4187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/comments?post=4187"}],"version-history":[{"count":0,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb\/4187\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/media\/4053"}],"wp:attachment":[{"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/media?parent=4187"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb-category?post=4187"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=4187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}