Product: ImportOmatic

Description: This solution describes how to resolve the error: Required field missing: Constituent Code

Occurs when IOM is trying to add a new full constituent and constituent code is a required field in the database.

Occurs when there is a discrepancy between the constituent id listed in the file and the id existing on the constituent record

Occurs when importing non-constituent relationships and including virtual fields for the relationship, but not every row has a relationship

Version: All

Environment: All


If you are using a version of ImportOmatic that is 1.9.2 or previous, this error could be appearing erroneously. If Constituent Code is a required field in your database, and you have accounted for it in your data file and profile mapping, there may be another required field missing. The requirement of the Constituent Code constraint is hit before the actual requirement. This erroneous error was fixed in IOM version 2.1. Please upgrade to the latest version.

**If the error is not resolved by updating, please follow the below solution instead:

  1. Add a column in the source data file for the constituent code
  2. If all new constituents will have the same constituent code, a default set can be used. For more information on how to associate a default set in an import, please see this solution
  3. If importing relationships as full constituents, a column for the relationship's constituent code will need to be included as default sets do not apply to relationship records

If the constituent is existing in the database and these are not new records, this error is occurring because there is a possibility of a discrepancy between what is in the file as the constituent id and what is in the database as the constituent id. Use the following steps to resolve:

  1. Open the profile you are working with and select "Constituents" from the profile navigation pane
  2. Place a check mark in the check box in front of "Do Not Add New Constituents If they Do Not Match An Existing 
  3. Highlight "ID Matching" in the profile navigation pane as well and select to "Treat the data row as an exception".These few changes will allow you to prevent adding new records to the system during import and place any record that is not matched via Constituent ID into the exceptions file as well. 

If adding non-constituent relationships

  1. Open the profile you are working with and select "Virtual Fields" from the profile navigation pane
  2. See if there are any virtual fields for Individual Relationship or Organization Relationship
  3. Open the data file and find the columns for the Individual's last name and/or the Organization's name
  4. If there are any rows that don't contain a relationship, this error will occur because virtual fields are a blanket application. IOM is trying to add the value in the virtual field to a relationship and is hitting the constituent code requirement when trying to add that relationship
  5. Move the virtual field to the data file and populate the value for those rows that have a relationship. Alternately, split the file and import the rows with a relationship first and then import the rows without a relationship after setting the virtual field to Ignore

Refer to the ImportOmatic User Guide for additional information.