Answers.Body: <p>OK - it took me quite a while, but this answer gave me a clue:</p>
  <p><a href="https://civicrm.stackexchange.com/questions/4107/activity-drop-down-list-not-displaying-activites">Activity drop down list not displaying activites</a></p>
  <p>The issue was that the value of filter was set to null.  I used the API explorer to compare an activity I could see:</p>
  <pre><code>{
  &quot;id&quot;: 123,
  &quot;option_group_id&quot;: 2,
  &quot;label&quot;: &quot;My Visible Activity&quot;,
  &quot;value&quot;: &quot;50&quot;,
  &quot;name&quot;: &quot;My Visible Activity&quot;,
  &quot;grouping&quot;: null,
  &quot;filter&quot;: 0,  //Note that filter is set to 0 
  &quot;is_default&quot;: false,
  &quot;weight&quot;: 81,
  ...
  }
  </code></pre>
  <p>with one I could not see:</p>
  <pre><code>{
  &quot;id&quot;: 1234,
  &quot;option_group_id&quot;: 2,
  &quot;label&quot;: &quot;My Invisible Activity&quot;,
  &quot;value&quot;: &quot;50&quot;,
  &quot;name&quot;: &quot;My Invisible Activity&quot;,
  &quot;grouping&quot;: null,
  &quot;filter&quot;: null,   //note that filter is set to NULL
  &quot;is_default&quot;: false,
  &quot;weight&quot;: 81,
  ...
  }
  </code></pre>
  <p>I then used an API call to update the the value of 'filter' to 0 and it appeared correctly in the dropdown list.</p>
  <p>To update an activity you have created and make it visible, here is an example using CV, but you can of course use the API Explorer to do the same thing:</p>
  <ol>
  <li><p>Get the values of the exisitng activity types:</p>
  <p>cv api4 OptionValue.get '{&quot;where&quot;:[[&quot;option_group_id&quot;,&quot;=&quot;,2]],&quot;limit&quot;:500}'</p>
  <p>This will give you a list of all your activity types and the various values defined.</p>
  </li>
  <li><p>Update the value of the Activity Type by setting the value of 'filter' to 0:</p>
  <p>cv api4 OptionValue.update '{&quot;values&quot;:{&quot;filter&quot;:0},&quot;where&quot;:[[&quot;option_group_id&quot;,&quot;=&quot;,2], [&quot;id&quot;,&quot;=&quot;,1234]]}'</p>
  </li>
  </ol>
  <p>This will now show up when you wish to add the custom field set for a particular activity type.</p>
  <p>What I do not understand is why Activity Types I have created in the past have a filter value set correctly, but more recent ones do not.  There is not an obvious way within the UI to enable or disable the visibility of individual Activity Types?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-28T19:35:00.340Z
Answers.Text: and you created the problematic Activity Type via the normal UI?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T09:50:35.577Z
Answers.Text: Sorry Peter for the delay in replying - yes, through the UI.  I just tried it again on my current clone of live (Civi5.41, Drupal 7.82) To reproduce, create a new activity type via UI menus i.e.- Administer/Customize data and screens/Activity types/Add Activity type [https://domain/civicrm/admin/options/activity_type?action=add&reset=1] I used for Contacts and Cases.  Then go create a Custom Field set through the UI -  the newly created Activity type will not be in the dropdown.
Answers.UserDisplayName: ChumKui
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T20:59:40.710Z
Answers.Text: I just tested on https://dmaster.demo.civicrm.org/civicrm/admin/custom/group?action=add&reset=1. created an Activity Type = testtesttest, went to add Custom Field set. set it to Activities, check the drop down under Activities and see testtesttest. I don't u'stand why we are getting different outcomes.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-07T18:25:58.500Z
Answers.Text: It must be to do with my set up somewhere along the line - no idea why.  I have just found another instance.  I think out it down to experience.  The joys of software....
Answers.UserDisplayName: ChumKui
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-07T20:36:12.977Z
Answers.Text: Thx for commenting back. Best if you can put an Answer saying 'something', then this can get closed and you get a few more points
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-28T08:43:59.420Z
Answers.LastActivityDate: 2021-09-28T08:43:59.420Z
Answers.UserDisplayName: ChumKui
Body: <p>I am trying to create a custom field set that will add additonal fields to a new activity type I have just defined. The activity type can be used for Contacts and Cases.</p>
  <p>When I try and create the custom field set and select 'Used for' Activities, the drop down list of activities does not contain the new Activity I have created.  It seems to stop at a certain point.  What am I missing?!  I have had no problems in the past.</p>
  <p>I am using CiviCRM v5.41 with Drupal 7.82</p>
  
Tags: <custom-fields><activities>
Title: Not all Activity types are displayed when creating a custom field set
ThreadText: # Not all Activity types are displayed when creating a custom field set
  
  (Asked by: username_0 on 2021-09-28)
  
  I am trying to create a custom field set that will add additonal fields to a new activity type I have just defined. The activity type can be used for Contacts and Cases.
  
  When I try and create the custom field set and select 'Used for' Activities, the drop down list of activities does not contain the new Activity I have created. It seems to stop at a certain point. What am I missing?! I have had no problems in the past.
  
  I am using CiviCRM v5.41 with Drupal 7.82
  
  **Tags:** custom-fields, activities
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-09-28. Score: 1
  
  OK - it took me quite a while, but this answer gave me a clue:
  Activity drop down list not displaying activites
  The issue was that the value of filter was set to null.  I used the API explorer to compare an activity I could see:
  {
  "id": 123,
  "option_group_id": 2,
  "label": "My Visible Activity",
  "value": "50",
  "name": "My Visible Activity",
  "grouping": null,
  "filter": 0,  //Note that filter is set to 0 
  "is_default": false,
  "weight": 81,
  ...
  }
  
  with one I could not see:
  {
  "id": 1234,
  "option_group_id": 2,
  "label": "My Invisible Activity",
  "value": "50",
  "name": "My Invisible Activity",
  "grouping": null,
  "filter": null,   //note that filter is set to NULL
  "is_default": false,
  "weight": 81,
  ...
  }
  
  I then used an API call to update the the value of 'filter' to 0 and it appeared correctly in the dropdown list.
  To update an activity you have created and make it visible, here is an example using CV, but you can of course use the API Explorer to do the same thing:
  
  Get the values of the exisitng activity types:
  cv api4 OptionValue.get '{"where":[["option_group_id","=",2]],"limit":500}'
  This will give you a list of all your activity types and the various values defined.
  
  Update the value of the Activity Type by setting the value of 'filter' to 0:
  cv api4 OptionValue.update '{"values":{"filter":0},"where":[["option_group_id","=",2], ["id","=",1234]]}'
  
  
  This will now show up when you wish to add the custom field set for a particular activity type.
  What I do not understand is why Activity Types I have created in the past have a filter value set correctly, but more recent ones do not.  There is not an obvious way within the UI to enable or disable the visibility of individual Activity Types?
  
  > **Comments:**
  > **username_1**: and you created the problematic Activity Type via the normal UI?  
  > **username_0**: Sorry Peter for the delay in replying - yes, through the UI.  I just tried it again on my current clone of live (Civi5.41, Drupal 7.82) To reproduce, create a new activity type via UI menus i.e.- Administer/Customize data and screens/Activity types/Add Activity type [https://domain/civicrm/admin/options/activity_type?action=add&reset=1] I used for Contacts and Cases.  Then go create a Custom Field set through the UI -  the newly created Activity type will not be in the dropdown.  
  > **username_1**: I just tested on https://dmaster.demo.civicrm.org/civicrm/admin/custom/group?action=add&reset=1. created an Activity Type = testtesttest, went to add Custom Field set. set it to Activities, check the drop down under Activities and see testtesttest. I don't u'stand why we are getting different outcomes.  
  > **username_0**: It must be to do with my set up somewhere along the line - no idea why.  I have just found another instance.  I think out it down to experience.  The joys of software....  
  > **username_1**: Thx for commenting back. Best if you can put an Answer saying 'something', then this can get closed and you get a few more points  
  
  ---
  
  