Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..

cancel
Showing results for 
Search instead for 
Did you mean: 
No ratings

Applies To


Product(s): Archer
Version(s): All Versions
Primary Deployment: On Premises/AWS Hosted/AWS SaaS

Description


When attempting to save a record, it fails and the below warning is thrown.

An unexpected error occurred while calculating field values for this record. Your previously stored field values, if any, have been retained for this record. Please contact your Archer administrator for assistance.

0EMVM00000D03Pp.png0EMVM00000D03Pp.png

The below errors are found in the w3wp logs.

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>2</EventID>
        <Type>3</Type>
        <SubType Name="Error">0</SubType>
        <Level>2</Level>
        <TimeCreated SystemTime="2024-11-21T14:23:19.6364112Z" />
        <Source Name="Archer.Engine" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
        <Execution ProcessName="w3wp" ProcessID="13060" ThreadID="35" />
        <AssemblyVersion>6.15.300.10238</AssemblyVersion>
        <Channel />
        <Computer>Server_name</Computer>
    </System>
    <ApplicationData>
        <TraceData>
            <DataItem>
                <TraceRecord Severity="Error" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord">
                    <TraceIdentifier>Archer.Engine</TraceIdentifier>
                    <Description>An item with the same key has already been added.</Description>
                    <AppDomain>/LM/W3SVC/1/ROOT/Archer-3-133766720764967983</AppDomain>
                    <Exception>
                        <ExceptionType>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
                        <Message>An item with the same key has already been added.</Message>
                        <Source>mscorlib</Source>
                        <StackTrace>   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 ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.LoadFiltersMap(SessionContext sessionContext, IList`1 filterIds)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.GetFieldRulesMap(List`1 calcFields, SessionContext sessionContext, IFieldDefinitionManager fieldDefMgr)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.ReadFieldsById(String instanceName, List`1 fieldIds, Boolean errorIfNotAllFieldsFound, SessionContext sessionContext)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.ReadFields(String instanceName, List`1 fieldIds)</StackTrace>
                    </Exception>
                </TraceRecord>
            </DataItem>
        </TraceData>
    </ApplicationData>
</E2ETraceEvent>

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>4</EventID>
        <Type>3</Type>
        <SubType Name="Error">0</SubType>
        <Level>2</Level>
        <TimeCreated SystemTime="2024-11-21T14:23:19.6631452Z" />
        <Source Name="Archer.Kernel.ContentSave" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
        <Execution ProcessName="w3wp" ProcessID="13060" ThreadID="35" />
        <AssemblyVersion>6.15.300.10238</AssemblyVersion>
        <Channel />
        <Computer>Server_name</Computer>
    </System>
    <ApplicationData>
        <TraceData>
            <DataItem>
                <TraceRecord Severity="Error" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord">
                    <TraceIdentifier>Archer.Kernel.ContentSave</TraceIdentifier>
                    <UserId>2</UserId>
                    <Description>An item with the same key has already been added.</Description>
                    <AppDomain>/LM/W3SVC/1/ROOT/Archer-3-133766720764967983</AppDomain>
                    <Exception>
                        <ExceptionType>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
                        <Message>An item with the same key has already been added.</Message>
                        <Source>mscorlib</Source>
                        <StackTrace>   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 ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.LoadFiltersMap(SessionContext sessionContext, IList`1 filterIds)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.GetFieldRulesMap(List`1 calcFields, SessionContext sessionContext, IFieldDefinitionManager fieldDefMgr)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.ReadFieldsById(String instanceName, List`1 fieldIds, Boolean errorIfNotAllFieldsFound, SessionContext sessionContext)
   at ArcherTech.Services.Providers.DataProviders.ArcherCommonDataProvider.ReadFields(String instanceName, List`1 fieldIds)
   at ArcherTech.Services.CalculationService.RecalculateContent.GetFieldsNeededForRecalc(DataProviderBase dataProvider)
   at ArcherTech.Services.CalculationService.RecalculateContent.Initialize(DataProviderBase dataProvider)
   at ArcherTech.Services.CalculationService.CalculationService.GetRecalculateContent(RecalculateContentInitializationParameters initializationParams)
   at ArcherTech.Services.CalculationService.CalculationService.RecalculateContentInternal(CalculationContent content, ICollection`1 changedFields, Boolean isNewContent, Boolean getWholeGraph)
   at ArcherTech.Kernel.Brokers.RecalculateContentForUpdateTask.ExecuteCalculationService(ContentContext contentContext)
   at ArcherTech.Kernel.Brokers.RecalculateContentTaskBase.Execute(ContentContext contentContext)</StackTrace>
                    </Exception>
                </TraceRecord>
            </DataItem>
        </TraceData>
    </ApplicationData>
</E2ETraceEvent>

Cause


This may occur due to the presence of duplicate Rule Filter Criteria IDs (filter_criteria_id), where multiple Rules across different fields share the same filter_criteria_id.


Resolution


Run the attached discovery script (Duplicate rule filter criteria ID v1.sql) against the Instance Database to identify duplicate Rule Filter Criteria IDs and all related details (as shown below).

0EMVM00000D0GtK.png0EMVM00000D0GtK.png

Following this, follow the steps below to delete and recreate the affected rules:

1. Login to Archer as an Administrator.

2. Expand the Administration menu.

3. Expand Application Builder > Select Applications > Open the Module(s) containing the affected Rules.

4. Go to the Designer tab > Layout sub-tab.

5. Locate the Field(s) with the duplicates under the Data Fields pane, and expand the Field Properties from the right pane.

6. For each field, locate the affected Rule and ensure to document its configuration.

7. Then delete the Rule and recreate it.

8. Click on Save Properties.

The records should now be saved successfully.

Note: Duplicate Rule Filter Criteria IDs may exist in different modules other than the module generating the warning during save.


Version history
Last update:
‎2024-11-22 04:28 PM
Updated by: