Answers.Body: <p>Hi from across the ditch. </p>
  
  <p>Not clear if your custom field is text or select. Assuming Text (which raises the question of why isn't it select)</p>
  
  <p>You can use Search Builder for this. Search > Search Builder.</p>
  
  <p>Select contact type that your custom fields apply to. Set operator to =</p>
  
  <p>Outcomes:</p>
  
  <p>No matches found for:
  Contact Type = 'Individual' ...AND...
  electorate freehand = East</p>
  
  <p>1 Contact<br>
  Contact Type = 'Individual' ...AND...
  electorate freehand = Eastern Metropolitan</p>
  
  <p>Does that help?</p>
  
  <p>Fields are on <a href="http://d46.demo.civicrm.org/civicrm/contact/search/builder" rel="nofollow">http://d46.demo.civicrm.org/civicrm/contact/search/builder</a> for the next x(&lt;24) hours</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-14T04:58:44.810Z
Answers.LastActivityDate: 2016-03-14T04:58:44.810Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>How do I do an EXACT search on a custom field – so instead of ending up with “LIKE” %Eastern Metropolitan%, in the search results I have an EXACT match?</p>
  
  <p>I tried “Eastern_Metropolitan” “Eastern-Metropolitan” but I still get this result (with the word LIKE) - i.e STATE_UPPER_HOUSE Like %Eastern_Metropolitan% - which shows “South-Eastern” and “Eastern Metropolitan” also.</p>
  
  <p>Here is how do the search</p>
  
  <ol>
  <li>Advanced Search
  •   Address Fields: Australia + Victoria
  •   CUSTOM Fields - ELECTORATES:  State_upper_house = “Eastern Metropolitan”</li>
  <li>After exporting the file and reviewing it we notice 2 things:
  a.  The list contains contacts with state_upper_electorate as “South-Eastern” and “Eastern Metropolitan”
  b.  There is an error on the first row of the .csv which not sure what this means;
  
  <ul>
  <li><b>Warning</b>:  strpos(): Empty needle in <b>/home/righttolife/www/www/administrator/components/com_civicrm/civicrm/CRM/Export/BAO/Export.php</b> on line <b>621</b><br /></li>
  </ul></li>
  </ol>
  
Tags: <joomla><search-results>
Title: EXACT search on a custom field instead of LIKE
ThreadText: # EXACT search on a custom field instead of LIKE
  
  (Asked by: username_0 on 2016-03-13)
  
  How do I do an EXACT search on a custom field – so instead of ending up with “LIKE” %Eastern Metropolitan%, in the search results I have an EXACT match?
  
  I tried “Eastern\_Metropolitan” “Eastern-Metropolitan” but I still get this result (with the word LIKE) - i.e STATE\_UPPER\_HOUSE Like %Eastern\_Metropolitan% - which shows “South-Eastern” and “Eastern Metropolitan” also.
  
  Here is how do the search
  
  1. Advanced Search
     • Address Fields: Australia + Victoria
     • CUSTOM Fields - ELECTORATES: State\_upper\_house = “Eastern Metropolitan”
  2. After exporting the file and reviewing it we notice 2 things:
     a. The list contains contacts with state\_upper\_electorate as “South-Eastern” and “Eastern Metropolitan”
     b. There is an error on the first row of the .csv which not sure what this means;
     * **Warning**: strpos(): Empty needle in **/home/righttolife/www/www/administrator/components/com\_civicrm/civicrm/CRM/Export/BAO/Export.php** on line **621**
  
  **Tags:** joomla, search-results
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-03-14. Score: 1
  
  Hi from across the ditch.
  
  Not clear if your custom field is text or select. Assuming Text (which raises the question of why isn't it select)
  
  You can use Search Builder for this. Search > Search Builder.
  
  Select contact type that your custom fields apply to. Set operator to =
  
  Outcomes:
  
  No matches found for:
  Contact Type = 'Individual' ...AND...
  electorate freehand = East
  
  1 Contact  
  Contact Type = 'Individual' ...AND...
  electorate freehand = Eastern Metropolitan
  
  Does that help?
  
  Fields are on <http://d46.demo.civicrm.org/civicrm/contact/search/builder> for the next x(<24) hours
  
  
  ---
  
  