I am trying to create a dictionary using assign activity. It works fine the first time but when I use it for another dataframe I am getting an error
Main has thrown an exception
Source: Dictionary EC
Message: An item with the same key has already been added.
The keys should be unique, You can’t add duplicate values to Keys. Better check before adding whether the dictionary is having the the current key value.
If the Key is already present in the dictionary this error will occur.
You can check if condition before adding into dictionary.
do you mean to say the dictionary shoudl not contain keys with the same name? because the column i use to make the dictionary doesnt have duplicate values.
@arivu96 but how will I know which key is same? because the column i use for making this dictionary has all unique values only
The Keys should not contains Duplicate values.
I doesnt… all the keys are unique
Before assign check the value are already exists in the Dictionary
True-> key already exists
Else-> you can add the key into Dictionary
You can overwrite existing key values with the Assign activity, but you just can’t add a new key with an existing key. So you can only do the Add part one time.
but I am making a new dictionary all together. with all unique key values. I still get this error
How you are making new dictionary.
From Where you are taking values to add into the Dictionary.