1

Kindly help us with address search builder please. We wanted to make all the fields in the address as one string and then search for the address using reg expression.

2

This isn't a feature that exists out of the box - but addresses support custom fields, so if you're comfortable writing an extension, you could do this. Create an extension with a hook_civicrm_pre that looks something like this:

function sharedaddresschanges_civicrm_pre( $op, $objectName, $id, &$params ) {
  if (($op == 'create' || $op == 'edit') && $objectName == 'Address') {
    $result = civicrm_api3('CustomValue', 'create', array(
      'entity_id' => $id,
      'custom_xx' => "street_address supplemental_address_1 city etc etc."
    );
  }
2

Stepping outside civi you could do this in Drupal Views via a Views Block using a Global "Combine Fields Filter", and set the resulting records with a link back to their civi contact.

0

You could use the Full Text Search feature which offers some of what you requested. It supports sql wildcards but not regex, and it does search across multiple tables and columns, although it doesn't concatenate them together first.

Your Answer

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

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