Answers.Body: <p>You can add custom fields for district.  Once you add the field you can map it in the import.  see <a href="http://gitbook.civicrm.org/organising-your-data/creating-custom-fields.html" rel="nofollow">http://gitbook.civicrm.org/organising-your-data/creating-custom-fields.html</a> for how to add the field.</p>
  
  <p>I'm not sure just what district is in this case.  If the addresses are for a foreign country that has district as part of the address, it may already sort of be there.  It may be stored in state province field.  If it is this case, you can see what's there by going to a contact, change the country and seeing what's in the pull downs.  If you are importing addresses from some other country you may need to add a field for country to your cvs.</p>
  
  <p>I'm not sure I fully understand the mismatched file problem.  If you have both individuals and households in the same file you will get a mismatched contact problem.  Then you need to either run the file twice.  Once for individuals and once for households and ignore the errors or split the file into two.</p>
  
  <p>The problem with the addressee is most likely picking the wrong field to map to.  The addressee field is expecting a smarty clause, like {contact.first_name}{ }{contact.middle_name}{ }{contact.last_name}, which creates the addressee on the fly by using using the values in other fields.  If you are trying import specific text to be the addressee then map it to "Addressee Custom".  (The same is true for postal and email greetings as well).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-16T20:44:39.200Z
Answers.LastActivityDate: 2015-10-16T20:44:39.200Z
Answers.UserDisplayName: Paul-Tahoe
Answers.Body: <p>It sounds like you're saying that "district" is the name for a division of a state or province.  The American and English term for this is "county", and CiviCRM has built-in support for counties nested within their respective states.  In some countries, multiple states will have a county with the same name--for example in the US, <a href="https://en.wikipedia.org/wiki/Montgomery_County" rel="nofollow">18 states have a "Montgomery County"</a>, so CiviCRM knows to pick the right one once you pick a state (just like the process of picking a country and then a state/province).</p>
  
  <p>You will need to do three things to get this set up.  First, go to <strong>Administer - Localization - Address Settings</strong>, scroll down to Address Editing, and click the box for County.  This will let you set counties for your contacts.</p>
  
  <p>Second, you will need to populate counties.  As long as I've known, CiviCRM has shipped with just a handful of counties, all in California.  For a while, <a href="https://issues.civicrm.org/jira/browse/CRM-7602" rel="nofollow">CiviCRM shipped with a SQL file with other American counties</a>, but it was cumbersome for the average user to load them.  Instead, I built an <a href="https://github.com/agh1/com.aghstrategies.uscounties" rel="nofollow">extension to load them</a>--enabling the extension adds them all to the database.</p>
  
  <p>If you have a list of all the districts for the country you're importing into, you can very easily build an extension to import them.  Copy the extension that's in <a href="https://github.com/agh1/com.aghstrategies.uscounties" rel="nofollow">https://github.com/agh1/com.aghstrategies.uscounties</a> and edit the array that has all the counties to have each item be the state/province id pointing to an array of the district names.</p>
  
  <p>Alternatively, you could just go into the civicrm_county table in the database and enter each district with the corresponding state/province ID.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-19T14:00:20.580Z
Answers.LastActivityDate: 2015-10-19T14:00:20.580Z
Answers.UserDisplayName: Andie Hunt
Body: <p>We are importing contacts into our CRM.  Our CSV file contains a District column, but while importing contacts, there's no such field present in CiviCRM--we need to add the district field. </p>
  
  <p>URL: example.com/?option=com_civicrm&amp;task=civicrm/import/contact&amp;_qf_MapField_display=true&amp;qfKey=7d325df8cb7e6a31c5c05551375c8292_1176</p>
  
  <p>Screen Shot: <a href="http://screencast.com/t/lDQAjxPXlJsJ" rel="nofollow">http://screencast.com/t/lDQAjxPXlJsJ</a></p>
  
  <p>So as shown in the screenshot, we want to add district under the state in the drop down. So there should be a column called "district" when we view the contact list.</p>
  
  <p>Also, when we're importing contacts, it is showing mismatched files. Is there any way to put all my contacts in a file to import without interruption?</p>
  
  <p>On the last step, it is importing only 145 contacts out of 250.  It is generating an Import Error CSV file with second column (Reason) containing "Invalid value for field(s) : Addressee must be one of the configured format options. Check Administer >> System Settings >> Option Groups >> Addressee for valid values."</p>
  
  <p>As I do not have enough experience in programming, please guide me on the simplest way to proceed.</p>
  
Tags: <custom-fields><import><county>
Title: Add fields in Matching CiviCRM fields on Import Contact
ThreadText: # Add fields in Matching CiviCRM fields on Import Contact
  
  (Asked by: username_0 on 2015-10-16)
  
  We are importing contacts into our CRM. Our CSV file contains a District column, but while importing contacts, there's no such field present in CiviCRM--we need to add the district field.
  
  URL: example.com/?option=com\_civicrm&task=civicrm/import/contact&\_qf\_MapField\_display=true&qfKey=7d325df8cb7e6a31c5c05551375c8292\_1176
  
  Screen Shot: <http://screencast.com/t/lDQAjxPXlJsJ>
  
  So as shown in the screenshot, we want to add district under the state in the drop down. So there should be a column called "district" when we view the contact list.
  
  Also, when we're importing contacts, it is showing mismatched files. Is there any way to put all my contacts in a file to import without interruption?
  
  On the last step, it is importing only 145 contacts out of 250. It is generating an Import Error CSV file with second column (Reason) containing "Invalid value for field(s) : Addressee must be one of the configured format options. Check Administer >> System Settings >> Option Groups >> Addressee for valid values."
  
  As I do not have enough experience in programming, please guide me on the simplest way to proceed.
  
  **Tags:** custom-fields, import, county
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-10-16. Score: 2
  
  You can add custom fields for district. Once you add the field you can map it in the import. see <http://gitbook.civicrm.org/organising-your-data/creating-custom-fields.html> for how to add the field.
  
  I'm not sure just what district is in this case. If the addresses are for a foreign country that has district as part of the address, it may already sort of be there. It may be stored in state province field. If it is this case, you can see what's there by going to a contact, change the country and seeing what's in the pull downs. If you are importing addresses from some other country you may need to add a field for country to your cvs.
  
  I'm not sure I fully understand the mismatched file problem. If you have both individuals and households in the same file you will get a mismatched contact problem. Then you need to either run the file twice. Once for individuals and once for households and ignore the errors or split the file into two.
  
  The problem with the addressee is most likely picking the wrong field to map to. The addressee field is expecting a smarty clause, like {contact.first\_name}{ }{contact.middle\_name}{ }{contact.last\_name}, which creates the addressee on the fly by using using the values in other fields. If you are trying import specific text to be the addressee then map it to "Addressee Custom". (The same is true for postal and email greetings as well).
  
  
  ---
  
  ### Answer by username_2 on 2015-10-19. Score: 1
  
  It sounds like you're saying that "district" is the name for a division of a state or province. The American and English term for this is "county", and CiviCRM has built-in support for counties nested within their respective states. In some countries, multiple states will have a county with the same name--for example in the US, [18 states have a "Montgomery County"](https://en.wikipedia.org/wiki/Montgomery_County), so CiviCRM knows to pick the right one once you pick a state (just like the process of picking a country and then a state/province).
  
  You will need to do three things to get this set up. First, go to **Administer - Localization - Address Settings**, scroll down to Address Editing, and click the box for County. This will let you set counties for your contacts.
  
  Second, you will need to populate counties. As long as I've known, CiviCRM has shipped with just a handful of counties, all in California. For a while, [CiviCRM shipped with a SQL file with other American counties](https://issues.civicrm.org/jira/browse/CRM-7602), but it was cumbersome for the average user to load them. Instead, I built an [extension to load them](https://github.com/agh1/com.aghstrategies.uscounties)--enabling the extension adds them all to the database.
  
  If you have a list of all the districts for the country you're importing into, you can very easily build an extension to import them. Copy the extension that's in <https://github.com/agh1/com.aghstrategies.uscounties> and edit the array that has all the counties to have each item be the state/province id pointing to an array of the district names.
  
  Alternatively, you could just go into the civicrm\_county table in the database and enter each district with the corresponding state/province ID.
  
  
  ---
  
  