If the source database is not availabe to clean up and re-export, the XER file can be cleaned by removing the orphaned records from the UDFVALUE tab. Use the xerFileParser&Builder.xls to repair the XER file. To download the xerFileParser&Builder.xls utility, see:
Solution ID prim4145: ”How to use the XER Parser utility.”.
NOTE: The process below describes how to do a Cross Check of the foreign keys to find child UDFVALUE entries that do not have a corresponding record on the Parent table. It is necessary to perform this cross check for each UDF type that is contained in the XER file. To determine the UDF types that exist, go to the UDFTYPE tab. Note the types present. (You will only need to do one check for each type even if it is listed multiple times.)
The possible UDFTYPES along with their corresponding keys are: DOCUMENT (doc_id), PROCITEM (proc_item_id), PROJCOST (cost_item_id), PROJISSU (issue_id) , PROJECT (proj_id), PROJRISK (risk_id), PROJWBS (wbs_id), RSRC (rsrc_id), TASK (task_id), TASKPROC (proc_id), TASKRSRC (taskrsrc_id)
The steps below use TASK udf type as an example:
1. Open the xerFileParser&Builder.xls utility and LOAD the XER file using the “Load XER file…” on the General tab.
2. Once the XER is loaded, click on “Diagnostics…” on the General tab. Select ‘Cross Check FK’.
3. In “Select Table” field choose the parent table from the drop-down, such as ’TASK’.
4. In the “Select Field(s)” list select the parent table key, such as ’TASK_ID” field if doing a check on TASK table.
5. In “Select Secondary Table” field always choose ’UDFVALUE’.
6. In “Select Secondary Field(s)” list always choose ‘FK_ID’ field.
![]()
7. Select ‘Run Diagnostic’.
8. When it is done, it will give you a list of ‘FK_ID’ values in the UDFVALUE table where the corresponding parent record does not exist on the parent table (eg. ‘TASK_ID’ is not in the TASK table). These are the “orphaned UDFVALUE records”. Go to the UDFVALUE tab and delete ALL the rows with those ‘FK_ID’ values. It is suggested to sort the worksheet by ‘FK_ID’ so rows are sorted by fk_id.
![]()
9. Repeat the process for each type of UDF found on the UDFTYPE tab as noted above.
In addition, for Task UDFTYPE records, there are often orphaned ’TASK_ID(s)’ that exists in the TASKACTV table as well. If those rows are not removed, the user will get event code CVRJC-2214-A when importing the XER. For more information on this, see:
Solution ID: prim20010 ”Receiving Event Code: CVRJC-2214-A while importing a project with orphaned rows in TASKACTV table.”
Go back to the General tab and click on Diagnostics.
10. Select ‘Cross Check FK’.
11. Select Table ‘TASK’.
12. Select ‘TASK_ID” field.
13. Select Secondary table ‘TASKACTV’.
14. Select Secondary ‘TASK_ID’ field.
15. Select ‘Run Diagnostic’.
16. When it is done, it will give you a list of ‘TASK_ID’ values in the TASKACTV table where the corresponding ‘TASK_ID’ is not in the TASK table. These are the orphaned records. You need to go to the TASKACTV tab and remove all the rows with those ‘TASK_ID’ values.
17. Finally, on the General tab, click the Build XER button.
18. Choose a new name for the “fixed” XER file.
19. Re-import the file. |