{"id":260,"date":"2014-03-28T16:06:08","date_gmt":"2014-03-28T21:06:08","guid":{"rendered":"https:\/\/linux.asberry.org\/blog_tech\/?p=260"},"modified":"2024-05-14T09:14:53","modified_gmt":"2024-05-14T14:14:53","slug":"tcc-count-function-and-grouping","status":"publish","type":"post","link":"https:\/\/asberry.org\/blog_tech\/?p=260","title":{"rendered":"TCC &#8211; Count Function and Grouping"},"content":{"rendered":"<p>I got asked today if it was possible to return just those users who had one group and that group was the main group. \u00a0I wasn&#8217;t able (yet) to use the count function in the filter so what I did was this:<\/p>\n<p>I returned UserNo, keyCount (count of\u00a0UserAccount,Groups,Name).<br \/>\nI added a filter to equal the string main group.<br \/>\nIn the resultant file, the users who had a count of 1 would only be in the main group.<\/p>\n<p>This isn&#8217;t ideal but it does give a list of those who are only in the main group with a little massaging. \u00a0Attached it the export file for this process.<\/p>\n<p><a href=\"https:\/\/linux.asberry.org\/blog_tech\/wp-content\/uploads\/2014\/03\/UserExport_sq.7z\">UserExport_sq<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got asked today if it was possible to return just those users who had one group and that group was the main group. \u00a0I wasn&#8217;t able (yet) to use the count function in the filter so what I did was this: I returned UserNo, keyCount (count of\u00a0UserAccount,Groups,Name). I added a filter to equal the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":["post-260","post","type-post","status-publish","format-standard","hentry","category-tcc","author-aron"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4bBkH-4c","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=\/wp\/v2\/posts\/260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=260"}],"version-history":[{"count":1,"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions"}],"predecessor-version":[{"id":262,"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions\/262"}],"wp:attachment":[{"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/asberry.org\/blog_tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}