Expression Evaluation Time: ms / Round trip: ms
Model Data Part 1: Building a DB Frontend
15. Aug
by Jens Category:

MatchPoint provides an interface to access and edit database records. When using MatchPoint's entity model concept, it is not necessary to use additional SharePoint Services like the Business Data Connectivity Service. This reduces complexity and saves much time. Beyond that, MatchPoint provides its own permission abstraction layer for accessing database records.

The central configuration instance for all model-related data within MatchPoint (model data adapter as well as model data provider or model choice provider) is the model configuration: It is used to map a database schema.

Basic Database Scheme

For this example we are using a simple database schema (as described below) and then use the model to configure the following GUI with MatchPoint:

  • A Data Grid Web Part with a model data provider to display all existing model data.
  • A Form Web Part to display and edit data.

The database schema used for the following example looks like this:

Setting up the Model Configuration

The heart of the model concept is the model configuration.

On the root element, the database connection is configured. Below, entity elements can be configured to hold up basic information about a database table, like the table name and the primary key column.

An entity configuration contains field definitions. A field definition describes the behavior of the table column within the Form Web Part (which is used for editing and viewing database records).

The model configuration as described until now is a basic model configuration. We now will see how the model can be used as a data provider for displaying data within a Data Grid.

Displaying Data using a Model Data Provider

On a blank SharePoint site we place a Data Grid Web Part and configure the model data provider by selecting the "Product" entity.

After selecting the model entity, the columns within the Data Grid can be configured. The DataField selection only shows all columns that are configured on the model. To display the relation between product and subcategory, we can use a model lookup column.

After saving the Data Grid configuration, the result set from the data provider is rendered in the data grid. Each column can be configured to support filtering and sorting.

Daniel Matter
03.09.2012 01:46
Hi Jens

I tried to rebuild your example. With no success :-(...
- LookupColumns are rendered but they do not show any value. They just display the label "Subcategory" in each row instead of "BikeStands^", "Caps", etc...

Additional questions:
- How can I select, which column of the lookup column should be displayed?
- How can I display multiple fields of a referenced column?
04.09.2012 09:26
Hi Daniel

you probably need to change the configuration of the "DisplayName" expression in your ModelConfiguration (of the "Subcategory" entity) to something like this: {DataItem.Name}.

We will support the display of multiple fields in referenced columns in the next version 3.1.

Hope this helps, regards
Daniel Matter
04.09.2012 12:20
Hi Jens
Thanks for your hint. I looked everywhere but not model entity ;-)

This blog is about technical and non-technical aspects of the product MatchPoint and other SharePoint topics.

If you would like to post an article or if you have an idea for a post, please contact us.

Matthias Weibel
09.04.2018 01:12
Link is updated and works now. | Goto Post
09.04.2018 12:21
Link doesn't work. Could anyone explain what does... | Goto Post
14.03.2018 02:05
Hi Markus
We I use the config for SiteCollectionSe... | Goto Post
Reto Jeger
04.10.2017 09:15
Hello Reiner,
Thanks for pointing out the missing ... | Goto Post
29.09.2017 09:56
Hi, I downloaded the ZIP-file for MatchPoint Versi... | Goto Post