3

When using custom searches such as the Include/Exclude search, the resulting contacts can be exported, but there's no option given to select the fields. Fields to be included in the export file are apparently predefined in the search. That might make sense in some cases, but we have a scenario where the export file is pretty useless. Working around this with a temporary group or tag is a hassle.

Why is it that field mappings are not provided here? And can anybody assess what it might take to alter that behaviour in core, or which follow-up problems that would possibly implicate?

1
  • Yep, this has tripped us up a couple of times. I am asking on of our team to do a quick estimate on this to get a sense of what is required in case you might be able to help fund it.
    – petednz - fuzion
    Commented Jun 8, 2017 at 19:52

2 Answers 2

2

A work-around for this is:

  1. From the search results, create a new group.
  2. Go to Contacts » Manage Groups find your new group and click Contacts
  3. Choose Export Fields

It is an annoying bug, but obviously it's a bit akward for some reason.

1

Martin - one of our team had a quick dig. He says there is code that is intentionally preventing this, presumably as there is no presumption on what entity (member/contact/activity) is involved in the search.

Code involved can be seen at https://github.com/civicrm/civicrm-core/pull/11458/files

If that is enough for you to make a custom change (hack) to your system to get you over the hurdle, then good luck (normal warnings apply ie backup, etc)

If you would like us to work with you to sort this out either just for your situation, or a more generic fix that could end up as a community contribution (change to core, extension etc) then pls get in touch.

4
  • Thanks, Pete. Patching the code led to follow-up problems, namely all contacts instead of the search result being exported. I guess we will file an issue and try to contact core team next. Commented Jun 13, 2017 at 15:12
  • Okay. You are welcome to approach Partners such as Fuzion (us) to get these fixes done too.
    – petednz - fuzion
    Commented Jun 13, 2017 at 20:52
  • I'm not sure if it's really just a fix. In the meantime, I found this here in the issue tracker where the core team rated it as a feature in its own right: issues.civicrm.org/jira/browse/CRM-8140 Makes me think it might be not that simple. We'll await the core team's estimate. Thanks again, Pete! Commented Jun 14, 2017 at 7:06
  • This was "fixed" in 4.7.31 by PR 11458 but then found not fixed and quite problematic, so unfixed(!) again in 5.0. It remains a problem in 5.35. Commented Jun 15, 2021 at 8:42

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.