# makegrp

### Inaport Gold and above only

### makegrp(groupName, userId, syncFlag, code)

Creates a group with the specified name that will belong to the specified user ID.

## Arguments

Argument | Data Type | Description
groupName | string | Name of GoldMine group be created
userId | string | The user ID to be the owner of the group
syncFlag | boolean | Tells the function to create the group with the syncronsied setting.*
code | string | This is the group code that will be used

## Returns

No value returned.

## Description

Creates a new group with the name that is specified by the argument groupName, and it will create it for the user ID specified by the userId. If the user ID argument is not included or is blank then the user ID that has been set up for the current import will be used. The group will be created at the start of the import before the contacts are brought in. Please note that to use the latter optional parameters you have to have put something in the previous arguments, even if you do not wish to use them. This can be done by just having an open and close quotes to represent the argument, see the last example to see how this is done.

## Examples

Example | Returns | Description
makegrp("NewInvoices") |  | creates a group called "NewInvoices" for the user ID that is set in for current import
makegrp("NewInvoices", "BLOGGS") |  | creates a group called "NewInvoices" for the user ID "BLOGGS"
makegrp("NewInvoices", "BLOGGS", true) |  | creates a group called "NewInvoices" for the user ID "BLOGGS" and sets the syncronised group flag to true
makegrp("NewInvoices", "BLOGGS", false, "123") |  | creates a group called "NewInvoices" for the user ID "BLOGGS" and sets the syncronised group flag to true. It also sets the code to be "123"
makegrp("NewInvoices", "", "", "123") |  | creates a group called "Invoices" with the code of "123". Note that to use the last parameter, the preceding optional parameters have to be present, and in this case they are just blank strings.

## See Also

addtogrp(), attachap(), cleargrp(), removefromgrp(), removegrp()

*Currently the syncFlag is not supported. All groups created with this flag set to false will still set the syncronsied flag in the group inside GoldMine, this means that the TLogs are written to when members are added and removed from the group.