Skip to main content

Linked Combo Type - Schema

On the Schema page of the Linked Combo Display Type wizard, define the parent-child relationship between fields. Every linked field must have a parent field except the primary parent field. Each linked field also requires a data binding expression that defines its mapping with the underlying XML data. GroupID provides a list of all possible data binding expressions (extracted from the XML source file) to select from.

Do the following:

  1. Map the Type binding expression list to the first worksheet (0-<worksheet name>) of the source Excel workbook. The portal fields use the binding expression to obtain reference to the worksheet in the source file to retrieve and display data from.
    Expressions in the Type binding expression list are auto generated with respect to the number of sheets in the source Excel workbook and the number of columns in a sheet. It is as:

    binding_expressions_examples

    In an expression, worksheet names are enclosed in brackets while the names of the data columns in the worksheets are without brackets. The expressions in the figure above indicate that the Excel workbook has three worksheets: Company, Country, and City.

    • The Company worksheet has one data column: Name.
    • The Country worksheet has two data columns: Name and State.
    • The City worksheet has four data columns: Name, Address, Address2, and ZipCode.
  2. Use the grid on the Schema page to link and relate the data from the Excel workbook sheets to the portal fields.

    1. Click Add to add a row.

      child_fields

    2. In the Linked Field drop-down list, select a field (for example, Country). This field will be linked to the data column represented by the binding expression you select in the Binding Expression drop-down list.
      The Linked Field list contains predefined, hard coded fields, where each field is already mapped to a schema attribute. When you map a field to an expression, the values in the worksheet’s data column will be available for the field in the portal. When a portal user selects a value, it is set as the attribute’s value for the field.

    3. The Parent Field list does not apply to the first row. For all other rows, use it to select the name of the parent field for the selected linked field. For example, when State is selected in the Linked Field list, select Country as the parent field.

    4. In the Binding Expression drop-down list, select an expression that represents the data column you want to link to the field selected in the Linked Field list.
      Expressions are auto generated with respect to the number of sheets in the source Excel workbook and the number of columns in a sheet, as shown in the figure above.

    The following example shows the relationship for an Excel workbook with three worksheets: 0-Company, 1-Country, and 2-City. (You can also create two linked combos to manage the relationship between these three fields.)

    schema

    The relationship formed between fields can be explained as:

    • The Company field, containing all records from the Name column on the Company worksheet, will be the primary linked combo field in the portal.
    • The Country field in the portal will contain all records from the Name column on the Country worksheet.
    • The State field in the portal will contain all records from the State column on the Country worksheet. The Country field will be the parent field for the State field, which means that when a user selects a country, the State field will show the states in that country.
    • The City field in the portal will contain all records from the Name column on the City worksheet. The State field will be the parent field for the City field, which means that when a user selects a state, the City field will show the cities in the selected state.

    The complete structure for the data in the Excel workbook is explained in the following table.

    WorksheetColumnDescriptionExample
    0-CompanyIDCompany identifier1000 2000
    NameCompany nameNetwrix Consulting Netwrix Software
    1-CountryFKCompany identifier with which to link this record1000 2000
    IDCountry identifier1010 2010
    NameCountry nameUnited States Pakistan
    StateState abbreviationCA PU
    2-CityFKCountry identifier with which to link this record1010 2010
    IDCity identifier1011 2011
    NameCity nameLivermore Lahore
    AddressOffice address 15099 Preston Ave T8-A, Gulberg
    Address2Office address 2
    Zip CodePostal zip code or area code94551 54600

See Also