Configuring Sun Master Indexes

Configuring the Master Index MIDM Appearance

You can modify the configuration of the fields and objects to specify how they appear on the MIDM pages by modifying midm.xml. You can perform any of the following actions to customize the general appearance of the MIDM. Though some appearance options can be configured using the Configuration Editor, it is best to modify the XML file directly.

Perform any of the following tasks to configure the appearance of the MIDM.

Adding Objects to the MIDM

You can define additional objects for the MIDM as long as those objects are defined in object.xml. Each object can only contain the fields that are also defined for that object in object.xml. If you add objects to the object structure using the Configuration Editor, the new objects are automatically added to the midm.xml and you do not need to perform these steps.

ProcedureTo Add an Object to the MIDM

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. In the nodes list of the file, create a new node element.

  3. In the new node element, create and define the following elements.

    • name – The name of the object.

    • display-order – The order in which the child object types are displayed on the MIDM pages.

      For example:


      <node>
          <name>Phone</name>
          <display-order>3</display-order>
      </node>

      Note –

      You might need to renumber any existing objects to keep the numbering sequential.


  4. Define fields for the new object, as described in Adding Fields to the MIDM.

  5. Define the relationship of the object, as described in Defining MIDM Object Relationships.

  6. Save and close the file.

Modifying MIDM Objects

Once an object is defined in midm.xml, you can modify the name or display order. Only modify the name of an object if you modify the corresponding object name in object.xml and the remaining configuration files. Do not change the parent object name. If you modify an object in the object definition on the Configuration Editor, the midm.xml is automatically updated as well.

ProcedureTo Modify an MIDM Object

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. To modify the object name, change the value of the name element to the new name for the object.


    Note –

    If you change an object name, modify the name in the relationships section as well.


  3. To modify the order in which the object appears on the MIDM, change the value of the display-order element.

  4. If necessary, renumber the order of other child objects so they are sequential.

  5. Save and close the file.

Deleting Objects From the MIDM

Once an object is defined in midm.xml, you can remove the object. If the object remains defined in object.xml, then the object is still a part of the enterprise record, but does not appear on the MIDM. Before removing an object from the midm.xml, make sure none of its fields are required in order to create a new record. If you delete an object using the Configuration Editor, the object is automatically deleted from midm.xml.

ProcedureTo Delete an Object

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the node element naming the object to delete.

  3. Delete all text between and including the node element for that object.

    Using the sample below, to delete the Phone object, delete all the text in the sample.


    <node>
       <name>Phone</name>
       <display-order>3</display-order>
       <field>
          <name>PhoneType</name>
          <display-name>Phone Type</display-name>
          <display-order>1</display-order>
          <max-length>8</max-length>
          <gui-type>MenuList</gui-type>
          <value-list>PHONTYPE</value-list>
          <value-type>string</value-type>
          <key-type>true</key-type>
       </field>
       <field>
          <name>Phone</name>
          <display-name>PhoneNumber</display-name>
          <display-order>2</display-order>
          <max-length>20</max-length>
          <gui-type>TextBox</gui-type>
          <value-type>string</value-type>
          <input-mask>(DDD)DDD-DDDD</input-mask>
          <value-mask>xDDDxDDDxDDDD</value-mask>
       </field>
    </node>
  4. If necessary, renumber the order of the remaining objects so they are sequential.

  5. Remove the object from the relationship definition, as described in Defining Relationships Between Master Index Objects.

  6. Save and close the file.

Adding Fields to the MIDM

You can define new fields for an object in midm.xml, but the field must correspond with a field defined for that object in object.xml. Only the fields defined in midm.xml appear on the MIDM windows. If you add a field to the object structure using the Configuration Editor, it is automatically added to midm.xml.

ProcedureTo Define New Fields

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the node element that defines the object to which you want to add a field.

  3. In the node element, create a new element named field.

  4. Define and configure the elements listed inMIDM Field Configuration Elements for the new field-field_name element.

    For example:


    <field
       <name>LastName</name>
       <display-name>LastName</display-name>
       <display-order>2</display-order>
       <max-length>40</max-length>
       <gui-type>TextBox</gui-type>
       <value-type>string</value-type>
       <is-sensitive>false</is-sensitive> 
       <key-type>false</key-type>
    </field>
  5. If necessary, renumber any existing fields to keep the numbering sequential.

  6. Save and close the file.

MIDM Field Configuration Elements

The following table lists and describes the XML elements that define the fields that appear on the Master Index Data Manager.

Element 

Description 

name 

The name of the field as it appears in the object definition. 

display-name

The name of the field as it will appear on the MIDM. 

display-order

The order in which the field appears in the object on the MIDM. For example, specify 1 to indicate this is the first field on the MIDM pages, 2 to indicate it is the second field, and so on. The display order goes from left to right,

max-length

The maximum number of characters displayed on the MIDM for the field. 

gui-type

An indicator of the type of display for the field. Specify TextBox for a standard data entry field; MenuList for a field that must be populated by selecting from a drop-down list; or TextArea for a long field that requires a scrollbar, such as a comments field.

value-type

The Sun Master Index data type for the data populated in the field. Enter one of the following values: 

  • string - Field contains a string of characters.

  • date - Field contains a date value.

  • float - Field contains a floating point integer.

  • int - Field contains an integer.

  • char - Field contains a single character.

  • boolean - Field contains either “true” or “false”.

input-mask

A mask used by the MIDM to add punctuation to a field. You can add an input mask to display telephone numbers as “(123)456-7890” even though no punctuation is entered by the user. 

To define an input mask, type a character type for each character in the field, and place any necessary punctuation between the character types. For example, the input mask for the above telephone format is “(DDD)DDD-DDDD”. The following character types are allowed: 

  • D - indicates a numeric character.

  • L - indicates an alphabetic character.

  • A - indicates an alphanumeric character.


    Note –

    If the length of the input mask is greater than the value specified for the max-length element, the length of the input mask is used.


value-mask

A mask used by the master index application to strip any extra characters that were added by the input mask. This mask ensures that data is stored in the database in the correct format. This mask must be the same length as the input mask. 

To specify a value mask, type the same value as is entered for the input mask, but type an “x” in place of each punctuation mark. For example, if an SSN field has an input mask of DDD-DD-DDDD, you need to specify a value mask of DDDxDDxDDDD to strip the dashes before storing the SSN. A value mask is not required for date fields. 

value-list

The name of the menu list used to populate the drop-down list for the field. This is required if the gui-type specified for the field is MenuList, and it must match a code of an element in the sbyn_common_header database table.

is-sensitive

An indicator of whether the value of the field is hidden on the MIDM for records with a VIP status of “VIP”. Only users with the required security permissions can view the hidden information. Specify true to hide the field value; specify false (or remove the is-sensitive element) to display the field value.


Note –

This element is only used if the object-sensitive-plug-in-class in the impl-details section is populated.


key-type

An indicator of whether the field (or a combination of key fields) must be unique in an enterprise record. Unique key fields identify unique child objects in an enterprise object. For example, if the object structure contains a child object for addresses and each record can have only one of each type of address (for example, one home address and one work address), then the address type field would be a key field. Specify true to indicate the field is a key field; specify false if it is not.

Removing Fields From the MIDM

If a field is defined for an object in midm.xml, that field appears on the MIDM windows. If there are any fields defined in the object structure that you do not want to display on the MIDM, you can remove the field definition from midm.xml. If you remove a field from the object structure using the Configuration Editor, it is automatically removed from midm.xml.


Note –

If you remove a unique key type field, you must write a custom plug-in that will automatically populate a value into the field in order to meet unique key type field constraints.


ProcedureTo Remove a Field From the MIDM

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the field element that defines the field you want to remove.

  3. Delete the field elements that define the field you want to remove.

  4. If necessary, renumber the remaining fields, as described in Modifying MIDM Field Display Options.

  5. Save and close the file.

Modifying MIDM Field Display Options

Once a field is defined for an object in midm.xml, you can change the name that appears on the MIDM for that field, the location of the field, and the type for the field (such as text box, menu list, and so on).

ProcedureTo Modify a Field’s Display Options

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the node element that defines the object that contains the field you want to modify.

  3. Scroll to the field element you want to modify, .

  4. To modify the field label, change the value of the display-name element.

    For example:


    <display-name>Last Name</display-name>
  5. To modify the location of the field on the MIDM, change the value of the display-order element.

    For example:


    <display-order>1</display-order>

    Note –

    If you change the order of one field, you must change the order of at least one other field to maintain sequential numbering. For example, if you change a field’s location from “2” to “1”, you must then change the location of the field originally specified for location 1.


  6. To modify the type of field to display, change the value of the gui-type element.

    For example:


    <gui-type>TextBox</gui-type>

    Note –

    You can enter TextBox (for a standard field), MenuList (for a field whose value must be selected from a drop-down list), or TextArea (for a long field that requires a scrollbar).


  7. Save and close the file.

Specifying a Drop-Down List for an MIDM Field

Once a field is defined for an object in midm.xml, you can specify or change the name of the drop-down list for the field. If you modify the Code Module for the field in the Configuration Editor, the drop–down list is automatically updated in midm.xml.

ProcedureTo Specify a Drop-Down List

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the node element that defines the object containing the field you want to modify.

  3. Scroll to the field element you want to modify.

  4. Enter the name of the drop-down list in the value-list element.

    If the element does not exist for the field, create a new value-list element. For example:


    <value-list>STATE</value-list>

    Note –

    The value of the gui-type element for the field must be “MenuList” if you specify a drop-down list. The value-list element must match a code column value in the sbyn_common_header database table unless the drop-down list is populated by information in the sbyn_user_code table (as they might be for auxiliary IDs). In this case, the value-list element must match a code_list column value in sbyn_user_code.


  5. Save and close the file.

Specifying an MIDM Field’s Length and Format

Once a field is defined for an object in midm.xml, you can change the number of characters that can be entered for the field in the MIDM. You can also specify whether to automatically enter punctuation into a field on the MIDM, but remove the punctuation in the database. If you modify the field's length and format in the object structure using the Configuration Editor, midm.xml is automatically updated as well.


Note –

Field length here is constrained by the length of the database column containing the field and the length defined in object.xml.


ProcedureTo Modify a Field’s Length and Format

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the node element that defines the object containing the field you want to modify.

  3. Scroll to the field element you want to modify.

  4. To modify the length of a field, change the value of the max-length element.

    For example:


    <max-length>100</max-length>
  5. To modify the format of the field, change the value of the input-mask and value-mask elements.

    If these element do not exist for the field, create new input-mask and value-mask elements. For example:


    <input-mask>(DDD)DDD-DDDD</input-mask>
    <value-mask>xDDDxDDDxDDDD</value-mask>

    Note –

    If an input mask is defined, in most cases a value mask must also be defined. For information about input and value masks, see MIDM Field Configuration Elements.


  6. Save and close the file.

Modifying an MIDM Field's Data Type

Each field on the MIDM requires a specific type of data to be entered. For example, name fields generally require a data string and date fields require a valid date or numeric characters. The type of data defined for each field must correspond with the field type defined for that field in object.xml and in the database. If you modify a field's data type in the object structure using the Configuration Editor, midm.xml is automatically updated as well.

ProcedureTo Modify the Data Type

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the node element that defines the object that contains the field you want to modify.

  3. Scroll to the field element you want to modify.

  4. Change the value of the value-type element.

    For example:


    <value-type>string</value-type>
  5. Save and close the file.

Defining Key Fields for an Object

You can specify that a certain field or combination of fields be unique in a system object or SBR. An example of a unique fields would be the address type if only one address of each type is allowed. A field’s key type status in midm.xml must match its key type status in object.xml. If you modify a field's key type status in the object structure using the Configuration Editor, midm.xml is automatically updated as well.

ProcedureTo Modify the Key Status

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the node element that defines the object containing the field you want to modify.

  3. Scroll to the field element you want to modify.

  4. To specify that a field must be unique in a system object, change the value of the key-type element to true.

  5. To specify that a field does not need to be unique in a system object, change the value of the key-type element to false.

    For example:


    <key-type>false</key-type>
  6. To specify that a combination of fields must be unique for an object rather than just one single field, set the key-type element to true for each field.

  7. Save and close the file.

Masking Field Values on the MIDM

You can specify that the values of certain fields be hidden on the MIDM from users without the appropriate access permissions. You can create a custom plug-in that uses the value of the VIP Flag field to determine whether the values of specified fields are hidden (typically in records with a VIP status of “VIP” or “Employee”). In records with any other VIP status, the field values would be visible regardless of whether the field is marked for masking.

This option is only available if the object-sensitive-plug-in-class element in the impl-details section is populated with the custom plug-in class (by default, this element is empty).


Note –

To mask field values, you need to define a custom plug-in to implement the masking rules.


ProcedureTo Mask Field Values on the MIDM

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the node element that defines the object containing the field you want to modify.

  3. Scroll to the field element you want to modify.

  4. Change the value of the is-sensitive element to true.

    If the element does not exist for the field, create a new is-sensitive element. For example:


    <is-sensitive>true</is-sensitive>

    Note –

    The is-sensitive element must appear before the key-type element in the field definition.


  5. Save and close the file.

Defining MIDM Object Relationships

The relationships in midm.xml are predefined based on the information you provided when you created the object structure definition (object.xml). The relationship structure in midm.xml should match that of object.xml.

ProcedureTo Define Relationships

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the relationships element.

  3. Specify the name of the parent object in the name element.

  4. Specify the name of the child objects in the children elements.

    For example:


    <relationships>
       <name>Person</name>
       <children>Alias</children>
       <children>Address</children>
       <children>Phone</children>
       <children>AuxId</children>
    </relationships>
  5. To remove a child object from the relationships list, delete the children element defining the object you want to delete.

  6. Save and close the file.

Defining MIDM Local ID Labels

The local-id element, which is nested in the gui-definition element, defines alternate names for the local ID headings and labels. The name defined here replaces the default local ID heading and field names on all pages, including the search result column names. This element is optional, and if it does not exist the label names default to “Local ID”.

ProcedureTo Define Local ID Labels

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click midm.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the local-id element in the gui-definition element.

  3. Enter the name you want to appear on the MIDM for the local ID fields and headings.

  4. Save and close the file.