---
title: "KeyErrorAction Element (ASSL) | Microsoft Docs"
ms.custom: ""
ms.date: "03/14/2017"
ms.prod: "sql-server-2016"
ms.reviewer: ""
ms.suite: ""
ms.technology:
- "analysis-services"
- "docset-sql-devref"
ms.tgt_pltfrm: ""
ms.topic: "reference"
apiname:
- "KeyErrorAction Element"
apilocation:
- "http://schemas.microsoft.com/analysisservices/2003/engine"
apitype: "Schema"
applies_to:
- "SQL Server 2016 Preview"
f1_keywords:
- "KeyErrorAction"
helpviewer_keywords:
- "KeyErrorAction element"
ms.assetid: 91fa9f88-b79e-4996-9717-d7ca82b64ddd
caps.latest.revision: 34
author: "Minewiskan"
ms.author: "owend"
manager: "erikre"
---
# KeyErrorAction Element (ASSL)
Specifies the action for [!INCLUDE[msCoName](../../../includes/msconame-md.md)] [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] [!INCLUDE[ssASnoversion](../../../includes/ssasnoversion-md.md)] to take when an error occurs on a key.
## Syntax
```xml
...
...
...
```
## Element Characteristics
|Characteristic|Description|
|--------------------|-----------------|
|Data type and length|String (enumeration)|
|Default value|*ConvertToUnknown*|
|Cardinality|0-1: Optional element that can occur once and only once.|
## Element Relationships
|Relationship|Element|
|------------------|-------------|
|Parent element|[ErrorConfiguration](../../../analysis-services/scripting/objects/errorconfiguration-element-assl.md)|
|Child elements|None|
## Remarks
The value of this element is limited to one of the strings listed in the following table.
|Value|Description|
|-----------|-----------------|
|*ConvertToUnknown*|Convert the problem key to the unknown member value.|
|*DiscardRecord*|Discard the record.|
The enumeration that corresponds to the allowed values for **KeyErrorAction** in the Analysis Management Objects (AMO) object model is .
## See Also
[Properties (ASSL)](../../../analysis-services/scripting/properties/properties-assl.md)