Specifying Add, Edit, and Delete import actions
The Action attribute determines how an import affects existing objects in Metrics Management. The Action attribute in the XML header specifies the default action that applies to all objects in the import file. Specifying the Action attribute for an individual object overrides the default action. In the following example, the Add action for the user object overrides the default Edit action for the import file:
<Database Document_Name="Metrics Management Database Export" Document_Description="Export of objects from DataBase: Sample Corporate" Default_Action="Edit" >
<Objects>
<User Action="Add" name="Manager of distribution" >
<Name>Manager of distribution</Name>
<Objects>
The Action attribute can contain one of the following properties:
*Add
Add creates a new object in Metrics Management from each unique object in the import file. The object must have a distinct name to import successfully. The import fails if the database contains an object with the same name.
*Add, Edit
Add, Edit uses the Edit action if the object is found in Metrics Management and the Add action if it is not.
*Delete
Delete removes an object from the database that matches the object name and object type specified in the import file.
*Edit
Edit replaces the object in Metrics Management with the object from the import file.
*None
Objects with the None property cannot import back into Metrics Management. Use None when the file will not be imported back into Metrics Management. For example, you may wish to use the XML file with another system outside of Metrics Management.