0

I have a search page set up with a shortcode like this:

[civicrm component="profile" gid="18" mode="search" hijack="0"]

Everything seems to be working except that searching on a custom data field, "Certification," generally isn't working.

None of the other search fields are custom fields. Don't know if that relates to the problem.

------ new material below, added in response to comments -----

"Certification" is a text field and is set to "Searchable."

Some examples of content for the "Certification" field are shown below. I would expect that I could search on any string within any of these (e.g. Curr or Curriculum or Teac or Teacher). None of those work. Even searching on a complete entry like Coach, Trainer/Teacher, Curriculum Instructor doesn't work. The only one I've found that works is Coach -- I'm guessing because that is a complete entry with no commas? Perhaps the commas are causing the problem?

I'm realizing that this data was imported into a CiviCRM text field from a multiple-select field in another database. There were four options in the other database: Coach, Trainer/Teacher, Curriculum Instructor, and Mediator. I'm thinking I need to change or move this into a multiple-select field in CiviCRM. Not sure what the best/easiest way to do that is.

certification examples

Wordpress 4.7.5 CiviCRM 4.7.17

4
  • 1
    Please confirm that your Custom Field is set to be Searchable
    – petednz - fuzion
    Commented May 25, 2017 at 2:18
  • 1
    Also give us a hint as to what value in 'certification' should deliver a result
    – petednz - fuzion
    Commented May 25, 2017 at 2:19
  • Actually found one search that works. See material added at the end of the post. Commented May 25, 2017 at 3:17
  • have you tried searching for coac%? seems to work for me. % is the wildcard character to use in civicrm searching
    – petednz - fuzion
    Commented May 25, 2017 at 20:24

2 Answers 2

2

I would recommend changing the certification field into a multi-select. That way the search field will be a drop down and much easier for the end user. I had to do this recently. Here are the steps I took:

  • Create a new multi select custom field.
  • Make sure the values match the entries from the previous field to avoid errors in the next step.
  • Export the records with the current custom field. Make sure to include the contact ID
  • Now do a import updating the new custom field with the data from the old one.

These are the steps I took recently. Looks like you only have about 100 records in this group so it should work fine.

2
  • So export and import I do with SQL commands? Commented May 26, 2017 at 16:38
  • Okay, I get it. Not SQL. I used CiviCRM contact export and import. And it worked brilliantly. Thank you! Commented May 27, 2017 at 21:36
1

% is the wildcard character to use in civicrm searching. searching for coac%? seems to work for me.

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.