Contact support

Integrations & Payroll Export

SIMS integration - How to find Duplicate Additional MIS ID

Also covers: SWF Education - Find duplicate Additional MIS User ID

If there are duplicate Additional MIS ID in the database the sync will fail with

2025-06-10 05:05:38.6638 - ImportPopulation() ERROR: System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector) at SIMSIntegration.SIMSDirectDbIntegration.ImportPopulation()

Use the following script to find the duplicates..

select * from ( select ROW_NUMBER() over (partition by AdditionalMISUserID order by Id) as rn, * from ( select Id, ltrim(rtrim(AdditionalMISUserID)) as AdditionalMISUserID from Employees ) emps where isnull(emps.AdditionalMISUserID, '') <> '' ) amids where amids.rn > 1

Delete both of the duplicates from SWF and then resync SIMS population to import the current person.