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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search Builder Results-One Contact, Multiple Activities of one type
Pages: [1]

Author Topic: Search Builder Results-One Contact, Multiple Activities of one type  (Read 373 times)

ChrisKeefe

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.19
  • CMS version: Drupal 7.3.4
  • MySQL version: ?
  • PHP version: 5.3.10
Search Builder Results-One Contact, Multiple Activities of one type
December 16, 2013, 04:39:07 pm
Hi all,
I'm a Civi User, with no IT training and little experience. We're trying to better understand Search builder, so that we can be sure our data export process isn't losing important data.

When one contact has multiple activities of the same type, how does Search Builder determine which activity to report?

What we're doing:
We have used Search Builder to query all contacts where activity type =41, OR where other custom fields in the activity 41 fieldset are not null. (The OR search was included so that these fields would be included in the search results)

Many of the contacts we queried have 2-5 activities, all of type 41. In the search results, data from only one of those activities appears to be present. The "sub-fields" reported by this search (those included by using the OR search) are not consistent. (Some are null, some contain currency values). It is unclear to us from the documentation how Civi determines which activity to report.

Thanks for your help understanding this better!
Chris

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Search Builder Results-One Contact, Multiple Activities of one type
December 16, 2013, 06:15:59 pm
if there is any chance you can do same search from Adv search then at the top you have option to 'view results as' and should be able to choose Activities
in which case you would then get one row per Activity rather than one row per Contact which sounds like what you are getting currently.

Not sure how much that helps other than pointing you down another route that may not work - but if you are not familiar with the 'view results as' it is worth knowing about

good luck
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Search Builder Results-One Contact, Multiple Activities of one type
December 17, 2013, 07:50:16 am
Though this DOES make me realize that "view results as" isn't an option on Search Builder.  While I realize you can work around this by running a search, saving the resulting contacts as a group, then doing an Advanced Search for that group and selecting "View Results As Activity", is there some reason I can't think of why "View Results As" shouldn't be added to Search Builder?
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

ChrisKeefe

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.19
  • CMS version: Drupal 7.3.4
  • MySQL version: ?
  • PHP version: 5.3.10
Re: Search Builder Results-One Contact, Multiple Activities of one type
December 17, 2013, 01:51:44 pm
Those both look like valuable workarounds, and I'll play with them this week or next. Much obliged, folks!

I am interested in understanding the nuts and bolts of Civi better, and would value any insight available on the original question.

All the best,
Chris

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Search Builder Results-One Contact, Multiple Activities of one type
December 17, 2013, 02:01:08 pm
hi chris

key think to twig, which you may have already, is that if you are wanting to export Activities then you will potentially have multiple rows per contact - and you won't get this by doing an export of contacts
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search Builder Results-One Contact, Multiple Activities of one type

This forum was archived on 2017-11-26.