# CreateGroupAsync Method

## Overloads

| [CreateGroupAsync(String, NxGroupDef, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.GenericObject.CreateGroupAsync.htm#Qlik_Engine_GenericObject_CreateGroupAsync_System_String_Qlik_Engine_NxGroupDef_System_String_) |  | You can use the CreateGroup method with any object that contains an object grouping definition.<br><br>This method allows you to create a new subgroup of objects directly and add it to a group's members.<br><br>Returns the ID of the created subgroup. |
| --- | --- | --- |
| [CreateGroupAsync(AsyncHandle, String, NxGroupDef, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.GenericObject.CreateGroupAsync.htm#Qlik_Engine_GenericObject_CreateGroupAsync_Qlik_Engine_AsyncHandle_System_String_Qlik_Engine_NxGroupDef_System_String_) |  | You can use the CreateGroup method with any object that contains an object grouping definition.<br><br>This method allows you to create a new subgroup of objects directly and add it to a group's members.<br><br>Returns the ID of the created subgroup. |
| [CreateGroupAsync<T>(AsyncHandle, Func<Response, T>, String, NxGroupDef, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.GenericObject.CreateGroupAsync.htm#Qlik_Engine_GenericObject_CreateGroupAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_Qlik_Engine_NxGroupDef_System_String_) |  | You can use the CreateGroup method with any object that contains an object grouping definition.<br><br>This method allows you to create a new subgroup of objects directly and add it to a group's members.<br><br>Returns the ID of the created subgroup. |

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

## CreateGroupAsync(String, NxGroupDef, String)

You can use the CreateGroup method with any object that contains an object grouping definition.

This method allows you to create a new subgroup of objects directly and add it to a group's members.

Returns the ID of the created subgroup.

### Declaration

```

          public Task<string> CreateGroupAsync([QixName("qPath")] string path, [QixName("qGroupDef")] NxGroupDef groupDef, [QixName("qTargetGroupId")] string targetGroupId = null)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | path | Path to the definition of the object to be selected.<br>For example `/qNxGroupDef` . |
| [NxGroupDef](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.NxGroupDef.htm) | groupDef | Definition of the new group. |
| System.String | targetGroupId | Id of the group to create the new subgroup in (if not the called object). |

### Returns

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

### Implements

[IGenericObject.CreateGroupAsync(String, NxGroupDef, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IGenericObject.CreateGroupAsync.htm#Qlik_Engine_IGenericObject_CreateGroupAsync_System_String_Qlik_Engine_NxGroupDef_System_String_)

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

## CreateGroupAsync(AsyncHandle, String, NxGroupDef, String)

You can use the CreateGroup method with any object that contains an object grouping definition.

This method allows you to create a new subgroup of objects directly and add it to a group's members.

Returns the ID of the created subgroup.

### Declaration

```

          public Task<string> CreateGroupAsync(AsyncHandle asyncHandle, [QixName("qPath")] string path, [QixName("qGroupDef")] NxGroupDef groupDef, [QixName("qTargetGroupId")] string targetGroupId = null)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.AsyncHandle.htm) | asyncHandle | Handle to asynchronous method request |
| System.String | path | Path to the definition of the object to be selected.<br>For example `/qNxGroupDef` . |
| [NxGroupDef](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.NxGroupDef.htm) | groupDef | Definition of the new group. |
| System.String | targetGroupId | Id of the group to create the new subgroup in (if not the called object). |

### Returns

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

### Implements

[IGenericObject.CreateGroupAsync(AsyncHandle, String, NxGroupDef, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IGenericObject.CreateGroupAsync.htm#Qlik_Engine_IGenericObject_CreateGroupAsync_Qlik_Engine_AsyncHandle_System_String_Qlik_Engine_NxGroupDef_System_String_)

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

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

You can use the CreateGroup method with any object that contains an object grouping definition.

This method allows you to create a new subgroup of objects directly and add it to a group's members.

Returns the ID of the created subgroup.

### Declaration

```
public Task<T> CreateGroupAsync<T>(AsyncHandle asyncHandle, Func<Response, T> onResult, [QixName("qPath")] string path, [QixName("qGroupDef")] NxGroupDef groupDef, [QixName("qTargetGroupId")] string targetGroupId = null)
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [AsyncHandle](https://help.qlik.com/en-US/sense-developer/November2025/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/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Communication.IO.Response.htm), T&gt; | onResult | Continuation function |
| System.String | path | Path to the definition of the object to be selected.<br>For example `/qNxGroupDef` . |
| [NxGroupDef](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.NxGroupDef.htm) | groupDef | Definition of the new group. |
| System.String | targetGroupId | Id of the group to create the new subgroup in (if not the called object). |

### Returns

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

### Type Parameters

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

### Implements

[IGenericObject.CreateGroupAsync<T>(AsyncHandle, Func<Response, T>, String, NxGroupDef, String)](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IGenericObject.CreateGroupAsync.htm#Qlik_Engine_IGenericObject_CreateGroupAsync__1_Qlik_Engine_AsyncHandle_System_Func_Qlik_Engine_Communication_IO_Response___0__System_String_Qlik_Engine_NxGroupDef_System_String_)