Creating a Sub-Dataset

(Originally written for TMGW v4.x, the principles also apply to TMGW v5.x and v6.x)


There are many times when you will want to create a new dataset which contains only certain persons that are in your main dataset.  Some users have wanted to delete certain persons or lines and creating a sub-dataset is the easiest way of doing this. Also there will be times when you want a certain group of persons included in a report and you can't quite get that group without other persons being included.  But the sub-set will allow you to more easily control the content of the report.  This process does not change your main dataset except in adding a custom Flag and setting it.  The steps involved in creating a sub-dataset are not hard and are something like this:

  1. Creating a Custom Flag to indicate which persons should be placed in the new dataset.
  2. Setting the Custom Flag for those persons (this may have multiple steps).
  3. Creating the new dataset based on the Custom Flag.

Creating the Custom Flag.  The Custom Flag is only used for creating the sub-dataset and once it is done, you may delete the Flag or use it for something else.  For our purposes here, I'll assume that you have created a Custom Flag named Interim with settings of N(o) and Y(es) with N as the default.  Refer to my other page here on creating and setting the Related_By Flag for additional help in creating the Custom Flag.

Setting the Custom Flag. When the Flag has been created, you will need to define which persons should have the Flag set to Y. You may find it easier to define the persons that you want to have in the new dataset or the persons that you don't want.  You may also need to set the Flag for a small group at a time and use that for setting the Flag for other persons.  So if you decide to set the Flag for those that are not wanted in the new dataset, then those that have the Flag set to N would be the one placed in the new dataset.  But if you set the Flag for those that you do want in the new dataset, those that have the Flag set to Y would be the ones placed in the new dataset.

Creating the New Dataset. When the Flag has been set for every person that you want, you need to create a List of People Report and use the Flag in the Focus Filter.  Depending on how you set the Flag (whether the Flag is set for those to be included in the new dataset or not included), the filter will be something like this (with N or Y in place of the "?"):
                        INTERIM Flag                     Equals             ?         END
then you would click on the Secondary Output tab and select the Create New Dataset option.

When the List of  People report is generated, TMG will ask you for the name to be given the new dataset and where (the directory/folder) it should be created (the default is the TMGW directory/folder).  It will then create the dataset.

Using the New Dataset. Once the new dataset is created, you may immediately use it. 

1.  Do a final backup of your old dataset.  Keep this backup until you are very sure that you don't need any of the data for the persons that were "deleted" by creating the new dataset.

2.  Copy the new dataset over the old dataset (File=>Copy from the menu).

3.  When you are satisfied with the new dataset (under the name of the old dataset), delete the new dataset.


Return to the TMG Tips Tutorials Page.

Last revised:

Hit Counter