Answers.Body: <p>You can do it with the API explorer. Go to <strong>Support -&gt; Developer -&gt; API Explorer v4</strong> and enter settings exactly like this, except the three places where I refer to &quot;constituent_information.my_id_field&quot; you need to change it with the <em>exact</em> identifier of your custom field (to make sure you got it right, pick it from the &quot;Add Select&quot; list and then you can copy-paste it into the &quot;chain&quot; section):</p>
  <p><a href="https://i.sstatic.net/1ZZbt.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1ZZbt.png" alt="APIv4 Explorer" /></a></p>
  <p>PS the code in that &quot;chain&quot; section is a lot so here it is for you to copy (this part needs a dollar sign before the name of your field, but the Select section does not):</p>
  <pre><code>{where: [[id, =, $id]], values: {external_identifier: $constituent_information.my_id_field}}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-19T20:30:01.190Z
Answers.LastActivityDate: 2024-01-19T20:30:01.190Z
Answers.UserDisplayName: Coleman
Body: <p>Loving civicrm, just getting to grips with it. I've imported a load of contacts but I've made a rookie error and instead of importing my unique ID number for each contact into the 'external_identifier' field I created my own custom field and imported it there. Unfortunately, I have so many contacts the Surname/First Name are not unique, only the custom unique ID is truly the way to distinguish individual contacts from each other. Is there a way to copy all the data across from my custom unique ID field to 'external_identifier'? I've tried doing this with a SQL query in phpmyadmin but having no luck.</p>
  
Tags: <custom-fields><external-id>
Title: Copy the contents of Custom Field to external_identfier field for all contacts
ThreadText: # Copy the contents of Custom Field to external_identfier field for all contacts
  
  (Asked by: username_0 on 2024-01-19)
  
  Loving civicrm, just getting to grips with it. I've imported a load of contacts but I've made a rookie error and instead of importing my unique ID number for each contact into the 'external\_identifier' field I created my own custom field and imported it there. Unfortunately, I have so many contacts the Surname/First Name are not unique, only the custom unique ID is truly the way to distinguish individual contacts from each other. Is there a way to copy all the data across from my custom unique ID field to 'external\_identifier'? I've tried doing this with a SQL query in phpmyadmin but having no luck.
  
  **Tags:** custom-fields, external-id
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-01-19. Score: 2 | Accepted answer
  
  You can do it with the API explorer. Go to Support -> Developer -> API Explorer v4 and enter settings exactly like this, except the three places where I refer to "constituent_information.my_id_field" you need to change it with the exact identifier of your custom field (to make sure you got it right, pick it from the "Add Select" list and then you can copy-paste it into the "chain" section):
  
  PS the code in that "chain" section is a lot so here it is for you to copy (this part needs a dollar sign before the name of your field, but the Select section does not):
  {where: [[id, =, $id]], values: {external_identifier: $constituent_information.my_id_field}}
  
  
  ---
  
  