Appendix: Using the MODELDATABROWSER Element Tag

A Model Data Browser is a configurable table that you can add to an Authenticated page, letting logged-in users view - and potentially modify - form data saved to the active repository.

Example of a Model Data Browser.

The data available to individual users will depend on which Workgroups they are assigned to, as well as the relationships between those groups and any others with related data on the repository.

This element tag has the following default syntax:

<%# MODELDATABROWSER(
Headings="Heading 1,Heading 2,Heading 3,Heading 4,Heading 5,View"
Fields="Keyword1,Keyword2,Keyword3,Keyword4,Keyword5,[LINK]View"
ModelReferences="EnterModelReference") %>

You can create a new page with a ModelDataBrowser tag already added to its markup by opening the Site Map Inspector and selecting File > New > Pages > Model Data Browser.

The tag has three parameters you can use to determine the browser's contents:

Parameter Description
Headings A comma-separated string list of heading labels. Write them in the same order you want the data in the table to appear.
Fields A comma-separated string list of keywords that will inform the table which values to display. For each set of form data saved to the chosen model(s), the browser will display a row containing the corresponding keyword values for that form. To ensure the headings and values line up correctly, you must write these keywords in the same order as the values assigned to the Headings property, as described above.
ModelReferences A comma-separated string list containing the reference of each model whose data you want the browser to display.

Ideally, each of the models you reference should contain all of the Fields you have specified. If a particular field is not present in a model, the corresponding value will be absent from all rows representing that model.

You can add a column of hyperlinks to a Model Data Browser by inserting the following item into its Fields list:

[LINK]View

If you want the hyperlink to say something specific, replace "View" with a word or short phrase of your choosing.

The following example demonstrates a valid Fields parameter, including a hyperlink in the final column:

Fields="VARCRMName,VARAccountCount,VARContactCount,VARChangedWhen,VARChangedBy,[LINK]View"

This syntax will display a hyperlink at the end of the row, as shown below:

A hyperlink column rendered at the end of a Model Data Browser.

If a user clicks the hyperlink in any of a browser's rows, KnowledgeKube will do the following:

  1. Identify the model associated with the chosen row of data.
  2. Attempt to find a Page Link whose name matches the identified model's reference.

You will need to create the necessary page links if they do not already exist, and ensure each link references a page that hosts the correct model.

  1. Open the destination URL of the page link, if found. Otherwise, the web browser will return an error.
  2. Populate the model with data from the chosen row of your Model Data Browser.

Because this method opens an existing form rather than creating a blank one, making changes to and saving this data will result in the existing row being updated, rather than a new one being created.