I got a custom search which takes one parameter, group. This search gives us back the people in the group plus a custom status. I'd like to be able to add a number of menu items that would run the search for various specific groups.

I'd also like to have an automatic email go out, say every month, to certain people with the results.

I thought maybe saving the query results as a smart group might work but alas trying to create a smart group bombs.

So is it possible to just pass the parameter through the url or are there other solutions?

  • have you seen my answer at civicrm.stackexchange.com/questions/25787/… – petednz - fuzion Oct 7 '18 at 4:00
  • also can you clarify what you mean by 'smart group bombs' – petednz - fuzion Oct 7 '18 at 4:00
  • I have now looked at your answer. Sadly I need group_id, so that won't work in the case but I like it and will probably use it in other cases – Paul-Tahoe Oct 7 '18 at 17:29
  • By bombs, fatal error, In this case, badly formed sql. It appended a WHERE ( 1 ) AND contact_a.id NOT IN ( SELECT contact_id FROM civicrm_group_contact... to the end of the query. Should have been an AND. I'm guessing it did that because I shortcut the custom query sticking all the sql in one place and not dividing it up into select, from, where, having, etc. It did actually create the smart group and it works mostly. I'll have to spend the time to divide up the sql and see if that fixes that, sigh. I feel creating a simple custom query should be easier. The sql is easy, all the php... – Paul-Tahoe Oct 7 '18 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.