Answers.Body: <p>One option would be to test if this API import solution can get the data where you need it</p>
  
  <p><a href="https://github.com/eileenmcnaughton/nz.co.fuzion.csvimport" rel="nofollow noreferrer">https://github.com/eileenmcnaughton/nz.co.fuzion.csvimport</a></p>
  
  <p>(but yes otherwise I would be heading down the update in the db route)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-20T04:57:13.593Z
Answers.Text: Thank you!  Glad to know I'm not insane for considering straight db edits.  The db structure for events and event metadata does not appear sooo super complicated.
Answers.UserDisplayName: richardsplayground
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-20T04:02:55.327Z
Answers.LastActivityDate: 2019-09-20T04:02:55.327Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>You could do this using chaining in the API, either by script or with the API Explorer.</p>
  
  <p>Eg:</p>
  
  <pre><code>$result = civicrm_api3('Event', 'get', [
    'sequential' =&gt; 1,
    'options' =&gt; ['limit' =&gt; 0],
    'event_type_id' =&gt; "Fundraiser",
    'api.Event.create' =&gt; ['id' =&gt; "\$value.id", 'event_type_id' =&gt; "Meeting"],
  ]);
  </code></pre>
  
  <p>Or in words: find all the events of type Fundraiser.  For each one, use the 'create' API call with the id of the found event and set the type to Meeting.</p>
  
  <p>To run this in API Explorer you need to enter the chained part as json:</p>
  
  <p><a href="https://i.sstatic.net/ug8cd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ug8cd.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-21T04:13:17.670Z
Answers.Text: Wow!  I had no idea the API explorer could do this.  Thank you!!
Answers.UserDisplayName: richardsplayground
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-21T04:14:23.883Z
Answers.Text: So, just to be clear, even though I am calling api.Event.create, because I am providing it with the ID of an *existing* event, it acts more like a modify than a create?  It won't create duplicate events, surely?
Answers.UserDisplayName: richardsplayground
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-23T07:36:48.310Z
Answers.Text: That's right - calling 'create' with an id is the way that you update an existing entity.  In the example above, it will change the event type of the existing event to Meeting and will leave all other fields unchanged.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-20T08:00:11.257Z
Answers.LastActivityDate: 2019-09-20T08:00:11.257Z
Answers.UserDisplayName: Aidan
Body: <p>I recently created some custom fields and some new event types for events.  Now I need to edit each event to change the event type, as well as populate those custom fields, for 5 years worth of events.  I just need to edit 3 fields: the event type and 2 new custom event fields.</p>
  
  <p>I tried making a custom profile so I could do an export/import, but I guess custom profiles are not supported for events.</p>
  
  <p>A search of stackexchange suggests there is really no way to bulk edit event information.  </p>
  
  <p>Would it be horrifying if I made the edits manually in the database?  Any other suggestions on options to edit event data in bulk?</p>
  
  <p>Thank you!</p>
  
Tags: <civievent>
Title: Make changes to lots of events
ThreadText: # Make changes to lots of events
  
  (Asked by: username_0 on 2019-09-19)
  
  I recently created some custom fields and some new event types for events. Now I need to edit each event to change the event type, as well as populate those custom fields, for 5 years worth of events. I just need to edit 3 fields: the event type and 2 new custom event fields.
  
  I tried making a custom profile so I could do an export/import, but I guess custom profiles are not supported for events.
  
  A search of stackexchange suggests there is really no way to bulk edit event information.
  
  Would it be horrifying if I made the edits manually in the database? Any other suggestions on options to edit event data in bulk?
  
  Thank you!
  
  **Tags:** civievent
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-09-20. Score: 4 | Accepted answer
  
  You could do this using chaining in the API, either by script or with the API Explorer.
  Eg:
  $result = civicrm_api3('Event', 'get', [
    'sequential' => 1,
    'options' => ['limit' => 0],
    'event_type_id' => "Fundraiser",
    'api.Event.create' => ['id' => "\$value.id", 'event_type_id' => "Meeting"],
  ]);
  
  Or in words: find all the events of type Fundraiser.  For each one, use the 'create' API call with the id of the found event and set the type to Meeting.
  To run this in API Explorer you need to enter the chained part as json:
  
  > **Comments:**
  > **username_0**: Wow!  I had no idea the API explorer could do this.  Thank you!!  
  > **username_0**: So, just to be clear, even though I am calling api.Event.create, because I am providing it with the ID of an *existing* event, it acts more like a modify than a create?  It won't create duplicate events, surely?  
  > **username_2**: That's right - calling 'create' with an id is the way that you update an existing entity.  In the example above, it will change the event type of the existing event to Meeting and will leave all other fields unchanged.  
  
  ---
  
  ### Answer by username_1 on 2019-09-20. Score: 3
  
  One option would be to test if this API import solution can get the data where you need it
  
  <https://github.com/eileenmcnaughton/nz.co.fuzion.csvimport>
  
  (but yes otherwise I would be heading down the update in the db route)
  
  > **Comments:**
  > **username_0**: Thank you!  Glad to know I'm not insane for considering straight db edits.  The db structure for events and event metadata does not appear sooo super complicated.  
  
  ---
  
  