The $QueryGroup function can be used to create a value group based on the database query. There are two versions of the function. The first uses the default connection. The second allows the user to specify custom connection (predefined ODBC data source name). Both have the following parameters:
The second version has three additional parameters:
* you should use 32 or 64 bit version of the administrator depend on application version.
Note: function returns NULL value for an empty recordset
$QueryGroup(1,(select AgentName,Code from Contracts)) - specifies query as data source and uses 'AgentName' column.
$Group(1,2) - refers to the second column 'Code'.
$QueryGroup(1,(select AgentName,Code from Contracts),0,MyDb,UserName,Password) - uses "MyDb" ODBC data source with specified user name and password.