2

I'm trying to setup a search that finds participants for:

  • a specified event type,
  • with events that have started within a variety of time periods relative to today: I need to be able to find events that have started within the last 3 months, 6 months, 9 months, 12, 15 months... etc. I have a fairly wide variety of time periods I need to search.

This will be used to grant access to course materials relevant to various stages through a 3 year course.

But in search builder, I do not see an opportunity to search event types, nor to search date fields based on relative dates.

Are these two features possible in any of the search facilities?

Thanks!

2 Answers 2

1

You don't say what version of CiviCRM you're using, but I can do this using the Advanced Search function. Using this search I can filter by event types and use relative dates for the event start date. It's under the event panel when you're adding in your filters. This will give you a list of unique contacts that meet the criteria.

If you want to see all registrations (including each registration for people on more than one course) you can use the Find Participants search in the events menu.

Or you can also use the "display results as" feature in the advanced search if you want to build up your search with other non-event data. So you can filter on all criteria in the advanced search and then "display results as" participants to see the unique registrations.

5
  • Thanks Heather O... I should have added that I'm on 4.6.14. And as you say, everything is there in the Advanced Search feature... except the ability to do relative dates of arbitrary length. For a date field like Event start date, I can happily search for '1 month ago', '1 quarter ago', '1 year ago'... but I can't see a way to search for say '10 months ago', or '20 months ago'. I can be a bit flexible on the durations I need here, but I do need various lengths between 1 quarter, 1 year, 2 years and 3 years. Hence exploring the Search builder, but that doesn't seem to allow relative dates.
    – Andyg8
    Commented Apr 12, 2016 at 9:08
  • You're right Andyg8, there are fixed relative dates that CiviCRM provides. You'll see these date options in the reports too. Without customising CiviCRM, you're options would be to work with the existing relative dates, or use standard groups and manually run the search at a set frequency and add appropriate people into the groups. Alternately, you could look at adjusting CiviCRM to include your required dates.
    – Heather O.
    Commented Apr 13, 2016 at 7:37
  • Yes, good conclusions. Thanks! Regarding customising, can you point me in the direction of how to 'adjust Civicrm to include' those required dates?
    – Andyg8
    Commented Apr 13, 2016 at 13:01
  • It's not something I've done before, but there's a few issues logged around renaming and the following stack exchange post links to those: civicrm.stackexchange.com/questions/4815/… Would be a good starting point I think :)
    – Heather O.
    Commented Apr 13, 2016 at 13:25
  • Thanks! Very helpful. It seems 4.8 will offer huge flexibility on this point.
    – Andyg8
    Commented Apr 14, 2016 at 10:43
1

I think a patch for this is now being pushed to core for 4.6 and 4.7. Thanks to the Fuzion team!

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.