# GetSetAnalysisAsync Method

## Overloads

| [GetSetAnalysisAsync(String, String)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.GetSetAnalysisAsync.htm#Qlik_Engine_App_GetSetAnalysisAsync_System_String_System_String_) |  | Returns a set analysis expression from active selections or from a saved bookmark. Fields on the fly and Calculated dimensions will not be included in the generated expressions, instead a message indicating 'missing fields' will provided within the expression.<br><br>\| \| BookmarkId empty \| BookmarkId set \|<br><br>\|-----------------------\|--------------------------------------\|----------------------------------------------------\|<br><br>\|StateName empty (or $) \| Default selections state is returned.\| Default state ($) in bookmark with id is returned. \|<br><br>\|StateName set \| State selections is returned. \| State in bookmark with id is returned. \| |
| --- | --- | --- |
| [GetSetAnalysisAsync(AsyncHandle, String, String)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.GetSetAnalysisAsync.htm#Qlik_Engine_App_GetSetAnalysisAsync_Qlik_Engine_AsyncHandle_System_String_System_String_) |  | Returns a set analysis expression from active selections or from a saved bookmark. Fields on the fly and Calculated dimensions will not be included in the generated expressions, instead a message indicating 'missing fields' will provided within the expression.<br><br>\| \| BookmarkId empty \| BookmarkId set \|<br><br>\|-----------------------\|--------------------------------------\|----------------------------------------------------\|<br><br>\|StateName empty (or $) \| Default selections state is returned.\| Default state ($) in bookmark with id is returned. \|<br><br>\|StateName set \| State selections is returned. \| State in bookmark with id is returned. \| |
| [GetSetAnalysisAsync<T>(AsyncHandle, Func<Response, T>, String, String)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.App.GetSetAnalysisAsync.htm#Qlik_Engine_App_GetSetAnalysisAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_System_String_) |  | Returns a set analysis expression from active selections or from a saved bookmark. Fields on the fly and Calculated dimensions will not be included in the generated expressions, instead a message indicating 'missing fields' will provided within the expression.<br><br>\| \| BookmarkId empty \| BookmarkId set \|<br><br>\|-----------------------\|--------------------------------------\|----------------------------------------------------\|<br><br>\|StateName empty (or $) \| Default selections state is returned.\| Default state ($) in bookmark with id is returned. \|<br><br>\|StateName set \| State selections is returned. \| State in bookmark with id is returned. \| |

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

## GetSetAnalysisAsync(String, String)

Returns a set analysis expression from active selections or from a saved bookmark. Fields on the fly and Calculated dimensions will not be included in the generated expressions, instead a message indicating 'missing fields' will provided within the expression.

| | BookmarkId empty | BookmarkId set |

|-----------------------|--------------------------------------|----------------------------------------------------|

|StateName empty (or $) | Default selections state is returned.| Default state ($) in bookmark with id is returned. |

|StateName set | State selections is returned. | State in bookmark with id is returned. |

### Declaration

```

          public Task<string> GetSetAnalysisAsync([QixName("qStateName")] string stateName = null, [QixName("qBookmarkId")] string bookmarkId = null)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | stateName | Optional. The name of the state to get set analysis expression for. If left empty, the default state will be retrieved. |
| System.String | bookmarkId | Optional. The Id of the bookmark to get the set analysis expression for. If left empty, the current selection will be retrieved. |

### Returns

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

### Implements

[IApp.GetSetAnalysisAsync(String, String)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetSetAnalysisAsync.htm#Qlik_Engine_IApp_GetSetAnalysisAsync_System_String_System_String_)

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

## GetSetAnalysisAsync(AsyncHandle, String, String)

Returns a set analysis expression from active selections or from a saved bookmark. Fields on the fly and Calculated dimensions will not be included in the generated expressions, instead a message indicating 'missing fields' will provided within the expression.

| | BookmarkId empty | BookmarkId set |

|-----------------------|--------------------------------------|----------------------------------------------------|

|StateName empty (or $) | Default selections state is returned.| Default state ($) in bookmark with id is returned. |

|StateName set | State selections is returned. | State in bookmark with id is returned. |

### Declaration

```

          public Task<string> GetSetAnalysisAsync(AsyncHandle asyncHandle, [QixName("qStateName")] string stateName = null, [QixName("qBookmarkId")] string bookmarkId = null)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.String | stateName | Optional. The name of the state to get set analysis expression for. If left empty, the default state will be retrieved. |
| System.String | bookmarkId | Optional. The Id of the bookmark to get the set analysis expression for. If left empty, the current selection will be retrieved. |

### Returns

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

### Implements

[IApp.GetSetAnalysisAsync(AsyncHandle, String, String)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetSetAnalysisAsync.htm#Qlik_Engine_IApp_GetSetAnalysisAsync_Qlik_Engine_AsyncHandle_System_String_System_String_)

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

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

Returns a set analysis expression from active selections or from a saved bookmark. Fields on the fly and Calculated dimensions will not be included in the generated expressions, instead a message indicating 'missing fields' will provided within the expression.

| | BookmarkId empty | BookmarkId set |

|-----------------------|--------------------------------------|----------------------------------------------------|

|StateName empty (or $) | Default selections state is returned.| Default state ($) in bookmark with id is returned. |

|StateName set | State selections is returned. | State in bookmark with id is returned. |

### Declaration

```
public Task<T> GetSetAnalysisAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult, [QixName("qStateName")] string stateName = null, [QixName("qBookmarkId")] string bookmarkId = null)
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2024/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/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Communication.IO.Response.htm), T&gt; | onResult | Continuation function |
| System.String | stateName | Optional. The name of the state to get set analysis expression for. If left empty, the default state will be retrieved. |
| System.String | bookmarkId | Optional. The Id of the bookmark to get the set analysis expression for. If left empty, the current selection will be retrieved. |

### Returns

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

### Type Parameters

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

### Implements

[IApp.GetSetAnalysisAsync<T>(AsyncHandle, Func<Response, T>, String, String)](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetSetAnalysisAsync.htm#Qlik_Engine_IApp_GetSetAnalysisAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_System_String_)