New answers tagged

2

You could do it just with API Explorer 4 using chaining: I've added a couple of 'where' clauses for minor sanity - you might want to adjust those. This finds all the contacts satisfying the 'where' clauses and for each one, runs an update where $id and $nick_name in the chain clause refer to the values from the contact just looked up. Take a backup & ...


1

I don't think there's an extension but there is an api (https://docs.civicrm.org/dev/en/latest/api/). If you do it in SQL it wouldn't autoupdate other items like the "display_name", so you could write a little php script using the api to do it, and then run it with cv php:script. Basically you would want Contact.get and then Contact.create, e.g. ...


Top 50 recent answers are included