I would like to link one contact's address to the main address of a group of many other contacts. I see how to do this manually for one contact, but I cannot find a way to to this in a bulk way for a whole group. Thank you
2 Answers
This is how you set the address of all people in a certain group (group id = 13), to be the address of a specific, different contact (address id 15432)
SET @InGroup:=13; SET @MasterAddress:=15432;
UPDATE civicrm_address SET master_id = @MasterAddress WHERE contact_id IN (SELECT contact_id FROM civicrm_group_contact WHERE status = 'Added' AND group_id = @InGroup)
One way you can do this is to use the Advanced Search under the "Search" link on the Civi navigation bar. Expand the Address Fields tab, enter the address. This should produce a list of users with the indicated address. Now you can check all the users and use the dropdown to add them into the group.
-
I don't think you understood what I mean. I have a group of contacts, and I want to set their primary address, of all of them, to the address of another contact's address (the address of the organization they are all part of)– EladApr 26, 2017 at 9:36
-
1Have you tried the "Import Contacts" under Contacts? If you run identify all the group of contacts that needs their primary address changed, you can setup a spreadsheet with the updated address column and map it. However, I never tried this with data replacement.– KristineApr 26, 2017 at 19:38