1

I created a custom data field of type text (alphanumeric) for use in a profile, but now realize it should have been a textarea (primarily to support line/paragraph breaks). A number of the these text fields already have data in them. I have created a new textarea custom data field and need to get the data from the each text field into the textarea for the same contact. I'm thinking a can do it using SQL, something like this:

UPDATE table_name 
SET column1 = column2

However, poking around in phpMyAdmin, I can't find the relevant table.

Any help will be appreciated.

Wordpress 4.7.5 CiviCRM 4.7.17

1 Answer 1

2

To find the correct table(s), you need to know the id of the custom field as well as the id of the custom group it's in.

  • Go to Administer menu » Customize Data and Screens » Custom Fields
  • Click View and Edit Custom Fields next to the relevant custom field group.
  • Look in the URL - it should read something like: http://mysite.org/civicrm/admin/custom/group/field?reset=1&action=browse&gid=4
  • Look for the number after gid= (in the example above, "4").
  • In phpMyAdmin, look for the tables starting with civicrm_value. Find the one that ends with the gid you identified above.
  • You should be able to find your custom field data in there. If your fields are very similarly named, you might also need to know the custom field ID. In that case, click Edit Field and note the id in the URL. The custom field you're looking for ends with that number.

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.