2

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.

1 Answer 1

2

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):

APIv4 Explorer

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}}

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.