VERIFIED SOLUTION i

Resolve Interactive Driver Error: "Key already exists" in Spectrum

Products affected: Spectrum™

Issue

The following exception is displayed when accessing an exposed service via the Interactive Driver:

System.ArgumentException: Key already exists
Parameter name: Key
at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKeyDoesNotExistUsingCachedKeys(String key, IKeyedSubObject ignoreObject)
at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKeyDoesNotExist(String key, IKeyedSubObject ignoreObject)
at Infragistics.Win.UltraWinDataSource.UltraDataColumnsCollection.ValidateKeyDoesNotExist(String key, IKeyedSubObject ignoreObject)
at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKey(String key, IKeyedSubObject ignoreObject)
at Infragistics.Shared.KeyedSubObjectsCollectionBase.InternalInsert(Int32 index, IKeyedSubObject value)
at Infragistics.Win.UltraWinDataSource.UltraDataColumnsCollection.Insert(Int32 index, String columnKey, Type dataType)
at Infragistics.Win.UltraWinDataSource.UltraDataColumnsCollection.Add(String columnKey)
at Group1.ESD.PreviewService.PreviewControl.SetGridSchema(Grid grid, Schema schema, Boolean sorted, Boolean input)
at Group1.ESD.PreviewService.PreviewControl.SetOutputSchema(Schema schema)
at Group1.ESD.PreviewService.Views.PreviewServiceView.CreatePreviewControl()
at Group1.ESD.PreviewService.Views.PreviewServiceView.get_Control()
at Group1.ESD.Managers.Views.ShowViewControl.SetupCurrentView(IView view)
at Group1.ESD.Managers.Views.ShowViewControl.SetCurrentUntrustedView(IView view)

 
User-added image

Cause

This is caused by the service having a duplicate field in the Output Stage. The fields may have different casing such as "LATITUDE" and "latitude" and the Enterprise Designer will allow this but when viewing in the Interactive Driver the exception referenced above will be thrown.

Resolution

UPDATED: September 19, 2017
Resolve the duplicate field names, one will have to be removed or renamed. This is relative simple but can be a laborious task as the user will have to trace the two different fields throughout the data flow.