Answers.Body: <p>I assume you used a tabset hook to adapt the tab on the contact page. That is where you can influence the count as you can see here:</p>
  <pre><code>  $tabs[] = [
      'id' =&gt; &quot;mediweattestbeheer&quot;,
      'url' =&gt; CRM_Utils_System::url(&quot;civicrm/mediweattestbeheer/page/mediweattest&quot;, &quot;reset=1&amp;mid=&quot; . $contactId, TRUE),
      'title' =&gt; &quot;Attesten&quot;,
      'weight' =&gt; 16,
      'count' =&gt; CRM_Mediweattestbeheer_BAO_MediweAttest::telAttestenMedewerker($contactId),
      'class' =&gt; &quot;livePage&quot;,
    ];
  </code></pre>
  <p>For the <em>count</em> parameter I have used a function that counts the number of records in the table for the specific contact.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-25T07:00:28.277Z
Answers.LastActivityDate: 2021-01-25T07:00:28.277Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>I have filtered the data being shown in a custom group tab on contact page but I'm struggling on how to change the count being shown next to the tab name. Could anyone help me how? thanks</p>
  
Tags: <custom-fields><custom>
Title: Change count in Custom Tab with table according to filtered data
ThreadText: # Change count in Custom Tab with table according to filtered data
  
  (Asked by: username_0 on 2021-01-22)
  
  I have filtered the data being shown in a custom group tab on contact page but I'm struggling on how to change the count being shown next to the tab name. Could anyone help me how? thanks
  
  **Tags:** custom-fields, custom
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-01-25. Score: 3 | Accepted answer
  
  I assume you used a tabset hook to adapt the tab on the contact page. That is where you can influence the count as you can see here:
  
  ```
    $tabs[] = [
      'id' => "mediweattestbeheer",
      'url' => CRM_Utils_System::url("civicrm/mediweattestbeheer/page/mediweattest", "reset=1&mid=" . $contactId, TRUE),
      'title' => "Attesten",
      'weight' => 16,
      'count' => CRM_Mediweattestbeheer_BAO_MediweAttest::telAttestenMedewerker($contactId),
      'class' => "livePage",
    ];
  
  ```
  
  For the *count* parameter I have used a function that counts the number of records in the table for the specific contact.
  
  
  ---
  
  