Answers.Body: <p>Ideally, there should be an option with the label <code>-any-</code> in the above select input. But as it is not present, I don't think there is any UI setting to accept all phone type values for the profile field.</p>
  
  <p>Maybe, you can try API to trigger this (<code>Support -&gt; Developer -&gt; API Explorer</code>) OR <code>http://domainname/civicrm/api#explorer</code>.</p>
  
  <p>Select Entity as <code>UFField</code> and action as <code>create</code> and form the API something like -</p>
  
  <pre><code>$result = civicrm_api3('UFField', 'create', array(
    'id' =&gt; &lt;uf_field_id&gt;,
    'field_name' =&gt; "phone",
    'phone_type_id' =&gt; 0,
  ));
  </code></pre>
  
  <p>The first param is the <code>uf_field_id</code> which is the id of the profile field created in your screenshot. </p>
  
  <p>If you don't find the id, you can check by placing your cursor on the <code>Edit</code> link on the field row displayed for your profile. The URL will be shown on the bottom left of your browser. For eg: in the screenshot below 75 is the value of the field id.</p>
  
  <p><a href="https://i.sstatic.net/3aCT8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3aCT8.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-21T20:31:49.823Z
Answers.Text: Nice suggestion - I actually got it to work (i didn't test using the api, but with straight SQL). I configured the profile field to use the primary phone of type home. Then, taking the id of the profile field, I ran `update civicrm_uf_field set phone_type_id = NULL where id = 161` and it seems to work.
Answers.UserDisplayName: Jamie
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-12T10:34:47.093Z
Answers.LastActivityDate: 2018-04-12T10:34:47.093Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>Is there a way to set up a search view profile so that it shows the primary phone number for a contact regardless of what type of phone it is?  When setting up this profile, I am required to indicate a type of phone.  I want to be able to see results that show the primary phone regardless of type.  Thanks.</p>
  
  <p><a href="https://i.sstatic.net/BQ7Z0.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BQ7Z0.jpg" alt="Screenshot from profile settings"></a></p>
  
  <p>We are using version 4.7.24</p>
  
Tags: <contact-view><phone><primary>
Title: Search view profile to show only the primary phone number
ThreadText: # Search view profile to show only the primary phone number
  
  (Asked by: username_0 on 2018-04-11)
  
  Is there a way to set up a search view profile so that it shows the primary phone number for a contact regardless of what type of phone it is? When setting up this profile, I am required to indicate a type of phone. I want to be able to see results that show the primary phone regardless of type. Thanks.
  
  [![Screenshot from profile settings](https://i.sstatic.net/BQ7Z0.jpg)](https://i.sstatic.net/BQ7Z0.jpg)
  
  We are using version 4.7.24
  
  **Tags:** contact-view, phone, primary
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-04-12. Score: 2 | Accepted answer
  
  Ideally, there should be an option with the label -any- in the above select input. But as it is not present, I don't think there is any UI setting to accept all phone type values for the profile field.
  Maybe, you can try API to trigger this (Support -> Developer -> API Explorer) OR http://domainname/civicrm/api#explorer.
  Select Entity as UFField and action as create and form the API something like -
  $result = civicrm_api3('UFField', 'create', array(
    'id' => ,
    'field_name' => "phone",
    'phone_type_id' => 0,
  ));
  
  The first param is the uf_field_id which is the id of the profile field created in your screenshot. 
  If you don't find the id, you can check by placing your cursor on the Edit link on the field row displayed for your profile. The URL will be shown on the bottom left of your browser. For eg: in the screenshot below 75 is the value of the field id.
  
  > **Comments:**
  > **username_2**: Nice suggestion - I actually got it to work (i didn't test using the api, but with straight SQL). I configured the profile field to use the primary phone of type home. Then, taking the id of the profile field, I ran `update civicrm_uf_field set phone_type_id = NULL where id = 161` and it seems to work.  
  
  ---
  
  