WEBSITE

Sharepoint 2010 : Using an External Data Column, Building a Composite Application

12/21/2013 12:37:32 AM
Using an External Data Column

We already have our Customer data in its own list in SharePoint, but what if we wanted to use just one of those columns in a different list? Using a new column type called an External Data Column, we can achieve just that.

In our site we have a document library that we have been using for tracking customer forms such as invoices, presentations, and so on. Rather than using a choice column for the customer reference, we can pull this value directly from our enterprise customer list using the external Content Type we created earlier.

Figure 1 shows us adding a new column to our customer documents library. We select the External Data as the Column type, and then we configure that to use the Northwind Customers External Content Type which allows us to select a value from the CustomerID column. That’s all there is to it. Now when we pick a customer ID we know it is the correct value.

Figure 1. The External Data Column type allows you to select values directly from an external source such as a customer database




Building a Composite Application

So far we have built an External Content Type and used that to create an external list in our SharePoint site and also to create an External Data Column in our documents library. With all that done, we have enough to build a simple composite application.

The BCS provides several Web Parts that we can now use to build a composite application. Out of the box, we get the Web Parts listed in Table 1.

Table 1. Several Web Parts Provided by the BCS to Use to Build a Composite Application
Web PartDescription
Business Data ActionsDisplays a list of actions from an External Content Type
Business Data ItemDisplays a single item from an External Content Type
Business Data Item BuilderUses the query string to create a business data item and provides the value to other Web Parts
Business Data ListDisplays a list of items from the External Content Type
Business Data Related ListDisplays a list of items related to one or more parent items from an External Content Type
Business Data Connectivity FilterUses values from the External Content Type to use to filter the contents of Web Parts

So let’s build a composite application for our customers from Northwind. Our application will contain a filter where we pick our customer, and then the filter will be applied to a data item Web Part and a document library Web Part.

 

Note

The Business Data Web Parts are part of the Enterprise license; to access them you must activate the Enterprise Site Collection Features through Site Settings.


After creating a new page in our site, we edit the page to add our Web Parts as seen in Figure 2. All of the BCS Web Parts are in the Business Data folder in the Web Part navigator.

Figure 2. The BCS Web Parts can be found in the Business Data category after you enable Enterprise features

We are going to add the following Web Parts to our page: the Business Data Connectivity Filter, the Business Data Item, and then the Shared Documents list (for this we select from Existing List in the ribbon).

When we have our three Web Parts added to the page, we are going to connect the business data Web Parts to our Customers External Content Type and then configure them all to talk to each other. The Business Data Web Parts are easily connected to the External Content Type using the Web Part properties. Once we have those configured, we use Web Part connections to wire them together. Figure 3 shows how to connect the Web Parts. For our connections, the Business Data Connectivity is the provider(providing the customer ID to the other Web Parts), with the shared documents library and Business Data Item Web Parts being the consumers.

Figure 3. Connecting Web Parts allows them to talk to each other, so filter Web Parts can change the content of other Web Parts on the same page

With our connections configured, selecting a customer from the filter Web Part using the little icon to the right displays the customer details in the Business Data Item Web Part and will then filter the Shared Documents Web Part for just those customer documents. Figure 4 shows us what our application looks like after a customer has been selected.

Figure 4. Composite application for Northwind customers allows us to select a customer and have their details and documents appear in the other Web Parts

The BCS Web Parts give you many options for creating composite applications for integrating SharePoint data with your enterprise data. A typical extension of our composite page would be to use the other Web Parts in the Business Data category to display indicators relating to the customer.

Other  
  •  ASP.NET 4 in VB 2010 : Page Tracing (part 3) - Application-Level Tracing
  •  ASP.NET 4 in VB 2010 : Page Tracing (part 2) - Writing Trace Information
  •  ASP.NET 4 in VB 2010 : Page Tracing (part 1) - Enabling Tracing, Tracing Information
  •  ASP.NET 4 in VB 2010 : Logging Exceptions (part 4) - Retrieving Log Information
  •  ASP.NET 4 in VB 2010 : Logging Exceptions (part 3) - Custom Logs, A Custom Logging Class
  •  ASP.NET 4 in VB 2010 : Logging Exceptions (part 2) - Writing to the Event Log
  •  ASP.NET 4 in VB 2010 : Logging Exceptions (part 1) - Viewing the Windows Event Logs
  •  Sharepoint 2010 : Composite Applications with Business Connectivity Services - Getting Started with BCS (part 2) - Creating an External List in SharePoint, Adding Custom Actions to an External Data Li
  •  Sharepoint 2010 : Composite Applications with Business Connectivity Services - Getting Started with BCS (part 1) - Creating an External Content Type
  •  Sharepoint 2010 : Composite Applications with Business Connectivity Services - BCS Components
  •  
    Top 10
    Extending LINQ to Objects : Writing a Single Element Operator (part 2) - Building the RandomElement Operator
    Extending LINQ to Objects : Writing a Single Element Operator (part 1) - Building Our Own Last Operator
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    3 Tips for Maintaining Your Cell Phone Battery (part 1) - Charge Smart
    OPEL MERIVA : Making a grand entrance
    FORD MONDEO 2.0 ECOBOOST : Modern Mondeo
    BMW 650i COUPE : Sexy retooling of BMW's 6-series
    BMW 120d; M135i - Finely tuned
    PHP Tutorials : Storing Images in MySQL with PHP (part 2) - Creating the HTML, Inserting the Image into MySQL
    PHP Tutorials : Storing Images in MySQL with PHP (part 1) - Why store binary files in MySQL using PHP?
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS