THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Master Data Services Team

Blog for the Microsoft SQL Server Master Data Services (MDS) team. Blog posts are contributed by various team members.

Creating a Bing Map URL with a Business Rule

(this post was contributed by Brian Barnett, Senior Software Engineer on the MDS Team)

While using Bing Maps last night to look for directions I thought of a way to use MDS business rules to create a Bing Map URL link attribute. This may sound like merely a cool thing to try but not very useful. But, I’m going to show a couple of examples of how it could be useful to pique your interest for other possibilities.

Here is the URL format we will need to follow to open Bing Maps to a specific address:

For more info see the Bing Maps help topic Build your own URL.

I’m going to use the Customer sample model. We’ll need to add a link attribute to the customer entity then create a concatenation business rule to set the value of the link attribute. In this post I’m not giving the step-by-step, detailed instructions to create each item. Please see my Creating a Simple Business Rule and Enabling Human Workflow – Part 1 posts for specific instructions.

Add the link attribute

Add a new Free-form, link attribute to the Customer entity called BingMapURL.  Make sure the data type is Link.


Create the business rule

Now let’s create a rule to populate its value.

  1. Create a new rule and then navigate to the Business Rules Designer page.
  2. In the Components pane, expand the Actions and Change value nodes.
  3. Click the “equals a concatenated value” action and drag it to the THEN pane's Action label.
  4. In the Entity-Specific Attributes pane, click the BingMapURL attribute and drag it to the Edit Action pane's Select attribute label.
  5. In the Entity-Specific Attributes pane, click and drag the following attributes to the “Value” node of the “equals a concatenated value” action.
    1. AddressLine1
    2. City
    3. StateProvince
    4. PostalCode
  6. At this point your Edit Action should look like this


Now let’s add the Bing Map specific URL pieces.

  1. Right click on AddressLine1 attribute and select “Insert text” from the context menu.
  2. Double click the new line and enter this text, without the quotes, “”.
  3. Right click on the City attribute and select “Insert text” from the context menu.
  4. Double click the new line and enter this text, without the quotes, “%20”.
  5. Repeat steps 3 and 4 for the StateProvince and PostalCode attributes.
  6. Now your Edit Action should look like this.


  1. In the Edit Action pane, click Save. The action will be displayed.


  1. Click Back to return to the Business Rule Maintenance page.
  2. Optionally, on the Business Rules Maintenance page, for the row that contains your business rule, double-click a cell in the Name and Description columns to update the value.
  3. Click Publish Business Rules
  4. On the confirmation dialog box, click OK. The rule’s status will change to Active.

Try it out

Add a new customer then return to the Member grid. Scroll over to the right and you will see the populated BingMapURL.


Double click the link icon and then select View from the context menu.


A new browser window opens to the Bing Maps URL.


To prevent users from editing the BingMapURL attribute change the security permissions to Readonly. Other possibilities are to create another link attribute called BingMapDirectionsURL which would be the URL for directions from your company to the customer.

Here’s another example, which I’ll not walk through but simply give you as an idea. What if you have an internal (or external) product catalog website? If you are managing Product data in MDS then you can add a ProductCatalogURL link attribute to the Product entity then follow the same steps we did with the BingMapURL to create it.  The link would be the URL to jump to that product in the catalog.

If you want to take this a little further you could create an ASP.Net web application that utilizes the MDS API. You could create a product list page listing all the products. Each product listing would have a link to the product catalog using the ProductCatalogURL.

There are a lot of possibilities. All it takes is a little creativity.

Published Friday, February 19, 2010 9:07 AM by MDS Team
Filed under: ,



Arg said:

Very interesting Demo.

Is it possible to provide info on how we can utilize the API through Sharepoint/Biztalk?

Also any example of intiating a workflow through Business Rules?

March 18, 2010 5:35 AM

MDS Team said:

Hi Arg,

We are working on providing more guidance on using MDS with SharePoint and BizTalk but we don’t have anything published/released yet.

We do have a recent MSDN article on SharePoint workflow integration with MDS that you may want to go ahead and read.  You can find it here -



March 18, 2010 12:13 PM
New Comments to this post are disabled
Privacy Statement