Subsets Feature

Directory Update v2.x and Directory Manager v1.5 (as well subsequent versions) have a feature called subsets. Subsets allow you to create a parent -> child relationship between 2 sets of attributes. Others may call this feature cascading attribute sets. This feature allows a user to select a value from a dropdown list for one attribute and see a subset of values in the drop-down list of another attribute.

For example, a user could select a division name from the division attribute and then see only the departments within that particular division rather than a large list of departments. This feature has been tested with up to 2 separate subset relationships but also you can create a parent -> child -> grandchild relationship with 2 different subsets.

Note that you can only create a parent -> child relationship between a parent attribute and a single child attribute. You cannot have 2 child attributes.

This feature is controlled via the SubsetSettings.xml file found in the .\Settings folder. Set the enabled="false" option to enabled="true". Once enabled, all attributes specified in the SubsetSettings.xml file will be read from the SubsetSettings.xml file rather than the DirectorySettings.XML file.

<!-- SUBSETSETTINGS.XML version 1.0 -->
<!-- Subset allows creation of parent-child relationship between attributes. -->
<!-- Attributes must all be visible and editable in the DirectorySettings.XML file. -->
<!-- The singleValueDefault option, when enabled, automatically selects a child value if it is the only value in the "child" list. -->
<!-- Note that enabling singleVauleDefault will break some parent -> child -> grandchild relationships so use with caution. -->
<subsetSettings enabled="true">
        

Each subset consists of a parent attribute and child attribute. Note that both the parent attribute (such as division) and the child attribute (such as department) must be set to visible and editable on the interface via the DirectorySettings.XML file.

Figure 1 shows an example of a relationship between the division attribute and the department attribute. In this example, their 2 divisions in the company (Information Technology and Accounting). The Information Technology department has 3 departments (Development, Service Desk, Installations) and the Accounting department has 2 divisions (Accounts Payable and Accounts Receivable.)

<subsetSettings enabled="true">
  <subsetSetting parentField="division" childField="department">
    <parent value="Information Technology">
      <child>Development</child>
      <child>Service Desk</child>
      <child>Installations</child>
    </parent>
    <parent value="Accounting">
      <child>Accounts Payable</child>
      <child>Accounts Receivable</child>
    </parent>
  </subsetSetting>
<subsetSettings>
        

Figure 1: Simple example of a subset


The <subSetting> tag option has that instructs Directory Update and Directory Manager to take a default value if the child set has only one value.

<subsetSetting parentField="office" childField="department" singleValueDefault="true">
        

This enables you to create default values for attributes depending on the selection of another attribute. Note that this feature does not work properly if you create a 3-level parent-child-grandchild relationship.

Here in Figure 2 is another example of a parent -> child -> grandchild relationship. The relationship is Division -> Department -> Title.

<subsetSettings enabled="true">
  <subsetSetting parentField="division" childField="department">
    <parent value="Information Technology">
      <child>Development</child>
      <child>Service Desk</child>
      <child>Installations</child>
    </parent>
    <parent value="Accounting">
      <child>Accounts Payable</child>
      <child>Accounts Receivable</child>
    </parent>
  </subsetSetting>
  <subsetSetting parentField="department" childField="title" singleValueDefault="true">
    <parent value="Development">
      <child>Senior Developer</child>
      <child>Programmer</child>
    </parent>
    <parent value="Service Desk">
      <child>Help Desk Technician</child>
      <child>Call Router</child>
    </parent>
    <parent value="Installations">
      <child>Installer</child>
    </parent>
    <parent value="Accounts Payable">
      <child>Payables Manager</child>
      <child>Accounts Payable Clerk</child>
    </parent>
    <parent value="Accounts Receivable">
      <child>Receivables Manager</child>
      <child>Accounts Receivable Clerk</child>
    </parent>
  </subsetSetting>
<subsetSettings>
        

Figure 2: Parent -> Child => Grandchild example