"An item with the same key has already been added" when exporting Categories.

Version 3

    Verified Product Versions

    LANDESK Service Desk 7.7.xLANDESK Service Desk 7.8.xLANDESK Service Desk 2016.xLANDESK Asset Central 2016.x

    Problem

    Getting error message: "An item with the same key has already been added" when exporting Categories from within the Administration Component in Console.

     

    Solution

    This error message is casued by having duplicated categories in the category list that you are trying to export.

    Normally this should never happen but there has been a problem raised for the Category import that allows duplicate items to be created. This is problem number: 5002. If you are experiencing this problem, please raise an Incident with your support provider referring to problem 5002.

     

    The following sql script will identify any dupliacted Categories. The script is written for the Incident Category. If you are trying to export a different Category list, let your support provider now the name of the Category list and your support provider will be able to amend the script for you.

     

    ---

    select im_full_name, count (*) from im_incident_category
    where im_deleted = 0
    group by im_full_name
    having count (*) > 1
    order by im_full_name
    ---

     

    Once you have identified the duplicated Categories, you can either delete or rename these and you will then be able to export the Category list without any problem.