Group by File

The $FileGroup function creates a group based on the text file. It expects a set of delimited values in the source file.

The function has following parameters:

  1. Group number. Positive integer.
  2. Column number. Positive integer.
  3. Source file name*. String, quotation not required.
  4. (optional) Use data from file sequentially. 0 or 1. Optional, default is 0 (false). The first row will be used after the last of necessary.
  5. (optional) File values are patterns. 0 or 1. Optional, default is 0 (false).
  6. (optional) Value separator. Default is TAB. Use quoted (,) for comma.

* - the following macros can be used as a part of the file name: %APPDATA%, %DOCUMENTS%, %USERPROFILE%, %ALLUSERSPROFILE%


  1. $FileGroup(1,1,d:\data files\discounts.txt) - specifies 'discounts.txt' as data source and uses the first column.
    $Group(1,2) - refers to the second column.
  2. $FileGroup(1,1,d:\countries.txt,0,0,|) - the engine should use pipe as value separator for 'd:\countries.txt' file.
  3. $FileGroup(1,1,\\\C\dates.txt) - use file from the network share