# GetCardinalAsync Method

## Overloads

| [GetCardinalAsync()](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinalAsync.htm#Qlik_Engine_IField_GetCardinalAsync) |  | Retrieves the number of distinct values in a field. |
| --- | --- | --- |
| [GetCardinalAsync(AsyncHandle)](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinalAsync.htm#Qlik_Engine_IField_GetCardinalAsync_Qlik_Engine_AsyncHandle_) |  | Retrieves the number of distinct values in a field. |
| [GetCardinalAsync<T>(AsyncHandle, Func<Response, T>)](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinalAsync.htm#Qlik_Engine_IField_GetCardinalAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__) |  | Retrieves the number of distinct values in a field. |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinalAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinalAsync.htm)

## GetCardinalAsync()

Retrieves the number of distinct values in a field.

### Declaration

```

          Task<int> GetCardinalAsync()
    
  
```

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Int32&gt; |  |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinalAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinalAsync.htm)

## GetCardinalAsync(AsyncHandle)

Retrieves the number of distinct values in a field.

### Declaration

```

          Task<int> GetCardinalAsync(AsyncHandle asyncHandle)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;System.Int32&gt; |  |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinalAsync.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinalAsync.htm)

## GetCardinalAsync&lt;T&gt;(AsyncHandle, Func&lt;Response, T&gt;)

Retrieves the number of distinct values in a field.

### Declaration

```
Task<T> GetCardinalAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult)
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.Func&lt;[Response](https://help.qlik.com/en-US/sense-developer/May2026/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Communication.IO.Response.htm), T&gt; | onResult | Continuation function |

### Returns

| Type | Description |
| --- | --- |
| System.Threading.Tasks.Task&lt;T&gt; |  |

### Type Parameters

| Name | Description |
| --- | --- |
| T |  |