The process of importing User attributes is going to be different depending on whether or not you are importing into a database which has the same user population as the source database. If the target database has the same user list as the source database, you can import user attributes as user attributes. If the target database belongs to an external organization, for example, and their user population is different, these attribute values cannot be imported to a user type of attribute. If you attempt to do this, you will receive an exception for each object where a user attribute value is set, e.g.:


"Exception message: Obj> x040000000155B333 - No user with name: johndoe"


This is because user attribute values exist most only in the source database and not in the target database. For example, John Doe may be a user in the source database, but not in target databases. To import an user attribute, you must first create a string type of attribute in your target meta model to map the user attribute values to and then import the user attribute values to this new string attribute via mapping in the XML import file. 


Note: As a general rule, it is recommended that users always complete an analysis of the data to be imported before performing the import. Things to be considered are, for example, the source and destination meta models, the destination library, Foreign id, is this a one-time import or incremental import, etc. This analysis can help you avoid the extra cost of a potential clean-up of the data afterwords.


Creating a New Attribute of Type String 

First, you need to create a new string type of attribute in the target database. You can use any SID and Name, e.g., ABC Responsible. Or, you can reuse an existing string attribute.  How to create attributes is described in Creating Attributes.


Importing to a String Attribute

In the XML Import configuration, use the tag <AttributeType> in the <MetaDataConversion>. This optional <AttributeType> replaces the attribute type SIDs of attributes in the imported file from the "from" attribute value to the "to" attribute value. See the example below:


XML
<ImportFromXMLConfigs>
  <ImportFromXMLConfig id="default" sid="I">
...
    <MetaDataConversion>
      <AttributeType from="SID1*" to="SID2*"/>
    </MetaDataConversion>
  </ImportFromXMLConfig>
</ImportFromXMLConfigs>

*SID1 is the attribute SID of type User, and SID2 is the attribute SID of type String that you want to map SID1 to.


One important thing to take in to consideration when doing the above is whether or not you have already proceeded with importing data without the user attribute after receiving the warning.


If you already did an import for the data without the user attribute and now you want to do a second round import, there are two different scenarios based on the Status of the imported data.

Scenario #1: if the data that you already imported is "Released/CS Released", then doing a second import will force a new version for the existing data.

Scenario #2: if the data that you already imported is in "Work" status, then it will just be updated (NO force of new version).


If you released the data that you imported, our recommendation is to delete the imported data that does not have the user attribute values and start over.