KB1019
Duplicate keys error saving a plan file
Summary
When saving a plan file in the Axiom Desktop Client (Windows or Excel), or when running a Process Plan Files job in Scheduler, the following error may occur: "Duplicate keys were found in the source data." The cause of this error must be corrected in the plan file before data can be saved successfully.
Details
When saving data to a table in Axiom, each combination of key columns represents a unique record to be saved. If more than one record in the data to be saved has the same keys, typically those records are aggregated (combined) upon save. However, when saving a string field (such as Comments), if the string fields don’t match then the records with the same keys cannot be combined, causing a "duplicate keys" save error.
If a save error occurs when saving a plan file in the Axiom Desktop Client, the following error message displays:
After you click OK, the details about the save error display in the Save Data Errors task pane. For example:
In this example, the details tell you that the duplicate keys are present on the Expense tab, in rows 102 and 103. This message identifies the keys as “62102,17879,1”, which represents the key columns in the destination table for the save: ACCT, DEPT, and RECORDID.
When running Process Plan Files using Scheduler, you may see a similar error in the notification or the job results:
Resolution
As indicated by the error, there are multiple rows to be saved on the specified sheet that have the same keys (meaning values in the key columns of the destination table for the save). For example, a common cause of duplicate keys is when a user inserts a new row in the sheet, for an account that is already included on the sheet in a different area.
To resolve the issue, open the plan file and locate the duplicate rows in the specified sheet, using the row numbers indicated in the error message. There are several ways that the issue can be resolved, depending on the source of the issue:
-
Remove (delete) one of the duplicate rows from the sheet. This would be the proper approach if the row was inserted in error. If your security settings do not permit you to delete a row in the sheet, submit a request to your Axiom system administrator.
-
Change one of the rows to use a different key, so that all key values are no longer the same on both rows. In this example, you would change either the ACCT or the RECORDID. This would be the proper approach if the row was accidentally assigned to the wrong account or record ID.
-
If the duplicate rows are on purpose (meaning it was intended to combine two different rows with the same key values), then you must edit one of the rows so that the duplicate rows can be aggregated successfully. Review both rows to find the string (text), date, or Boolean (True/False) values that do not match, and correct them as needed.
If you have any issues resolving the duplicate rows, or if you are not sure which approach is correct in this case, contact Axiom Support for assistance.
Outcome
Once the duplicate rows are resolved, the plan file should save without error.
See also
Article information
Category |
File Groups / Plan Files |
Applies To |
All versions |
Tags |
Plan File Save Error, Duplicate Keys, Recalculate, Process Plan Files |
Issue Number(s) |
N/A |