Edit the DataDef.xml file for the data map skin

Note: Before editing the DataDef.xml file, you need to collect and set up the files needed for the data map skin you are creating. Information on setting up these files is available in Collect files needed for a new data map skin.

The DataDef.xml file contains all configuration settings (including where the data is located relative to the root map folder), the type of data, how labels are calculated, and how these types are included in incidents. This contains all of the information necessary to load the data for the user interface. This also supports special fields, which become document links and globally unique identifiers (GUIDs).

Note: Only point feature classes are supported; polygons and polylines may become supported in the future.

  1. (If you have not done so already) In Windows Explorer, navigate into C:\Program Files\FH Mobile Response\Maps\DataSkins.
  2. Navigate into the folder containing the map data skin files you will customize.

    Note: This is the Copy of SAMPLE folder that you renamed at the end of Collect files needed for a new data map skin.

  3. Using a text editor such as Notepad, open the DataDef.xml file.
  4. In the file, find DataTypeNameInMenus.

  5. Edit the text between <DataTypeNameInMenus> and </DataTypeNameInMenus> to be the name of the option you want to add to the Go → Open menu in FH Mobile Response, to represent your custom data skin.

    Example: To add a File → Open → FH Occupancies option to FH Mobile Response, you would change
    <DataTypeNameInMenus>MapItems [TODO:Rename]</DataTypeNameInMenus>
    to <DataTypeNameInMenus>My Custom Data Skin</DataTypeNameInMenus>

  6. On the next line of the file, find RootTable.

    The lines between <RootTable> and </RootTable> indicates where data is located, lists child tables that contain related data, and provides information about columns that require special handling. A single row under RootTable becomes an item in the data skin.

    Note: Not all columns need to be provided in the table definitions.

  7. Under the RootTable line, edit the text between <IsFeatureClass> and </IsFeatureClass> to indicate whether or not the table has geometry, or is a data-only table.

    Note: A value of true indicates that the table contains geometry, and a value of false indicates that the table is a data-only table.

  8. Edit the text between <TableType> and </TableType> to indicate the type of database that is hosting the table.

    Note: Supported values are ShapeFile, GdbAccess, and GdbFile.

  9. Edit the text between <Location> and </Location> to specify the directory or database path relative to the map folder.

    This path is typically C:\Program Files\FH Mobile Response\Maps. The Maps directory contains the .MXD file and the DataSkins folder.

  10. Edit the text between <TableName> and </TableName> to specify the name of the table within the database.
  11. On the next line, find ChildTables.

    Every table can have a set of child tables that contain records related to it. A child table is exactly the same as the root table, except that it also provides information about the relationship with the parent table.

  12. In the ChildTables section of the file, find RelationshipWParent and the lines below it.

  13. In the RelationshipWParent section, find RelationshipName.
  14. Write down the value between <RelationshipName> and </RelationshipName>, for reference later in the configuration process.

    Note: The value in RelationshipName is required in the dialog box that lists the associated records.

  15. Search for ColumnExtendedInformations.

    Note: You may find multiple occurrences of this line containing this tag in the file. If the line is <ColumnExtendedInformations />, you do not need to specify any additional parameters for it. If the line does not end in />, there is data below it in the file that you need to specify.

    Note: While not all column data must be specified in the data skin definition, you can use the ColumnExtendedInformations section of the file to add special columns that require information that does not exist in the meta data. Any table can have its own ColumnExtendedInformations section.

  16. In the file, search for ListItemFormatString.

  17. Edit the text between <ListItemFormatString> and </ListItemFormatString> to contain a format string that uses the value of fields in the root table.

    Caution: The names inside of { } must exist in the root table.

    Example: To list data from the root table on the data skin, you would change
    <ListItemFormatString>ObjectId: {ObjectId}
    Modify with fields and format string.</ListItemFormatString>


    to
    <ListItemFormatString>
        {name} {number} {st_prefix} {street} {st_type} {st_suffix} {city}
    </ListItemFormatString>

    Advanced format strings are also supported.

    Example: You could change
    <ListItemFormatString>ObjectId: {ObjectId} Modify with fields and format string.</ListItemFormatString>

    to
    <ListItemFormatString>{Created_Date:d}</ListItemFormatString>

    At runtime, this is converted into the programming statement String.Format(“{0:d}”,data[“Created_Date”]);

  18. Edit the text between <DocumentNameFormatString> and </DocumentNameFormatString> to insert a tab name and the name of a document when it needs to be displayed in a list or a tab.

    Note: The name of the document is calculated from the columns in the root table.

    Example: To dispay a tab named Occupancy: <document name>, you would change
    <DocumentNameFormatString>Preplan: {ObjectId}</DocumentNameFormatString>

    to
    <DocumentNameFormatString>Occupancy: {occup_id}</DocumentNameFormatString>

  19. Save and close the DataDef.xml file.
  20. Continue with Enable data skin interface editing.