CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • General Discussion (please no support requests here!) (Moderator: Michał Mach) »
  • Can I link activities to events?
Pages: [1]

Author Topic: Can I link activities to events?  (Read 1937 times)

marshcast

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: wordpress 3.4
  • MySQL version: mysql 5.5
  • PHP version: php5 5
Can I link activities to events?
July 09, 2013, 07:45:40 am
Hi,

I'd like to make an activity called an "incident". It will enable me to record incidents if they happen on events (we deal with children and safeguarding issues).

Is there a way to link these incidents to events?

I've tried to make a custom data set (incident_ev) and adding it to the event. This requires editing the event to report the incident and doesnt' enable adding more than 1 contact (without adding, say, 5 fields (limiting the number of those involved to 5))

As an acticity I can add more than one contact, but cannot link to an event.

Is there a middle way?

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Can I link activities to events?
July 09, 2013, 10:50:33 am
If you flip around the perspective, you could say that there is an activity type "Incident" with a custom-field called "Event Name". The main ingredients:

 * Go to "Administer => Custom Data and Screens => Custom Fields" and add a new fieldset which extends "Activities => Incident". Then add a custom field entitled "Event Name" with type "Alphanumeric Select", and add a list of options which match the events. Mark the field as "Searchable." Consider marking the field as "required."
 * To record a new incident, navigate to "Contact => New Activity". Be sure to choose the "Event Name" from the dropdown.
 * To view a list of incidents for a particular event, navigate to "Search => Find Activities" and filter by event name.

This does leave a bit of administrativa -- the list of options in "Event Name" must be manually updated to match the real list of events. Alternatively, if you can program PHP (or know a programmer or can hire a programmer), then one can write a small plugin for CiviCRM which manages the list automatically. (Note for developers: see http://wiki.civicrm.org/confluence/display/CRMDOC43/hook_civicrm_customFieldOptions )

marshcast

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: wordpress 3.4
  • MySQL version: mysql 5.5
  • PHP version: php5 5
Re: Can I link activities to events?
July 12, 2013, 08:02:10 am
This is brilliant, Thanks Totten.

Will have to get it coded as there are a few events every week, but looks like it shouldn't be too bad.

One day I'll be able to code it myself - if I can just get to understand the user side... --then I'll be able to be a  bit more useful!

Thank again

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • General Discussion (please no support requests here!) (Moderator: Michał Mach) »
  • Can I link activities to events?

This forum was archived on 2017-11-26.