Im having an issue where no matter what, I get an error that “An item with the same key has already been added.” even though the whole key column is completely empty. I have tried using now(), UTCNOW(), and UNIQUEID() with the same result for all instances. HELP?
Does this mean the entire Table is empty? A blank value is still a key value, and Appsheet won’t allow you to add another record with the same key.
You tried using these where? What is your Key column?
My key column is column A with “Key” in cell A1 and nothing else in the rest of the column
What happened before this error?
@Marc_Dillon All I did was fill out the form that is supposed to input to google sheets and hit save
I used those functions in the Initial Value box in the variable I have marked as my Key
Please post a screenshot of the error.
It gives the same error in the mobile client also
@Steve
Have you configured any custom actions?
@Steve I have not
Are there any formulas in or that affect the column of the spreadsheet that the app is using as the key column?
@Steve No, the column is completely blank except for the heading
Hi @Matthew_Reddy
Does your key column look like this?
@Lynn Yes it does
I’d suggest take a look at the audit log history from the Manage → Monitoring pane of the app editor. It will show you what exactly is being added and that may be helpful
2.Insert(TKey key, TValue value, Boolean add)\r\n at OfficeOpenXml.Table.ExcelTableCollection..ctor(ExcelWorksheet ws)\r\n at OfficeOpenXml.ExcelWorksheet.get_Tables()\r\n at OfficeOpenXml.ExcelWorksheet.SaveTables()\r\n at OfficeOpenXml.ExcelWorksheet.Save()\r\n at OfficeOpenXml.ExcelWorkbook.Save()\r\n at OfficeOpenXml.ExcelPackage.Save()\r\n at OfficeOpenXml.ExcelPackage.SaveAs(Stream OutputStream)\r\n at Nirvana.Data.XlsxSpreadsheetData.AppendRows(Context context, Op op, Int32 ownerId, String userToken, String tableQualifier, List
1 colTypes, List1 keyPositions)\r\n at Nirvana.Data.GDriveStorageProvider.AppendTableRows(Context context, Op op, String name, Int32 ownerId, String userToken, PhysicalSchema physicalSchema, DataFormat fileFormat, List
1 colTypes, List1 keyPositions)\r\n at Nirvana.Data.DataLayer.AppendTableRows(Context context, Op op, Int32 ownerId, AppTable appTable, List
1 colTypes, List1 keyPositions)\r\n at Nirvana.Internal.InternalAPI.AddTableRowInternal(Context context, Op op, Int32 userId, Int32 executeAs, ChangeEventWorkflowRuleEvaluator changeEventWorkflowRuleEvaluator)\r\n at Nirvana.Internal.InternalAPI.PerformOperation(IPerfCollector perfCollector, Context context, Op op, Int32 userId, String appTemplateVersion, Boolean& success, String& errorMessage, Exception& errorException, UpdateModeEnum requiredUpdateMode, RowOperation rowOperation)" Properties: { "TableName": "Restock Sheet", "apiLevel": "2", "appStartTime": "2021-05-21T12:52:10.657Z", "appTemplateVersion": "1.000017", "build": "c1568b8d4af93c30a536-1621550456145-3cd00f3e", "checkCache": "true", "clientId": "28a00899-59fa-4fea-a458-c50bd7a57144", "dataStamp": "2021-05-21T12:52:47.782Z", "isPreview": "false", "lastSyncTime": "2021-05-21T12:52:10.0867982Z", "localVersion": "1.000017", "locale": "en", "mechanism": "Form", "requestId": "98989393", "requestStartTime": "2021-05-21T12:52:48.007Z", "timestamp": "2021-05-21T12:52:47.778Z", "tzOffset": "360", "viewName": "Post-Job Restock", "AppTemplateVersion": "1.000017", "RowSize": 37, "AppTemplateName": "89f7efe6-30d8-4fec-a8b7-7124b04c945d", "Operation": "Add row", "RecordType": "Stop", "Errors": "Unable to add/edit/delete row in table 'Restock Sheet'. → An item with the same key has already been added.", "Exception": "System.ArgumentException: An item with the same key has already been added.\r\n at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)\r\n at System.Collections.Generic.Dictionary
2.Insert(TKey key, TValue value, Boolean add)\r\n at OfficeOpenXml.Table.ExcelTableCollection…ctor(ExcelWorksheet ws)\r\n at OfficeOpenXml.ExcelWorksheet.get_Tables()\r\n at OfficeOpenXml.ExcelWorksheet.SaveTables()\r\n at OfficeOpenXml.ExcelWorksheet.Save()\r\n at OfficeOpenXml.ExcelWorkbook.Save()\r\n at OfficeOpenXml.ExcelPackage.Save()\r\n at OfficeOpenXml.ExcelPackage.SaveAs(Stream OutputStream)\r\n at Nirvana.Data.XlsxSpreadsheetData.AppendRows(Context context, Op op, Int32 ownerId, String userToken, String tableQualifier, List1 colTypes, List
1 keyPositions)\r\n at Nirvana.Data.GDriveStorageProvider.AppendTableRows(Context context, Op op, String name, Int32 ownerId, String userToken, PhysicalSchema physicalSchema, DataFormat fileFormat, List1 colTypes, List
1 keyPositions)\r\n at Nirvana.Data.DataLayer.AppendTableRows(Context context, Op op, Int32 ownerId, AppTable appTable, List1 colTypes, List
1 keyPositions)\r\n at Nirvana.Internal.InternalAPI.AddTableRowInternal(Context context, Op op, Int32 userId, Int32 executeAs, ChangeEventWorkflowRuleEvaluator changeEventWorkflowRuleEvaluator)\r\n at Nirvana.Internal.InternalAPI.PerformOperation(IPerfCollector perfCollector, Context context, Op op, Int32 userId, String appTemplateVersion, Boolean& success, String& errorMessage, Exception& errorException, UpdateModeEnum requiredUpdateMode, RowOperation rowOperation)”,That looks like an internal bug. Please contact support@appsheet.com for further help with this.
Hey I’m having the same problem you are describing, and I’m wondering if you learned how to solve it. I appreciate any help with this issue.
Igual, mismo problema si n solucion
I have the same problem.
does anyone have a solution?
User | Count |
---|---|
41 | |
31 | |
31 | |
16 | |
14 |