Hyperlinks can be added to measure items for use in directing users to other applications, websites or views. The hyperlinks can be used in combination with other measure item features, such as for measure items that display images in views.
The basic steps for adding a hyperlink and a couple examples follow.
1. Double-click the measure item in view explorer.
2. In the Properties window, set the Hyperlink property to Yes.
3. In the Hyperlink Expression window, set up an expression to define the hyperlink and then click OK in that window.
4. {Optional} Customize other measure item features such as applying a conditional format or pop-up label.
This example uses a URL only in the hyperlink expression. Clicking the hyperlink in the related view will access the Mapquest home page.
"http://www.mapquest.com"
The next examples include view information in the hyperlink expression. In the first example, several attribute relationships for Customer Sold-To are used in the expression. The city, state, and postal code information derived from the current member are used as parameter values in the URL.
"http://www.mapquest.com/maps/map.adp?&city=" + [Customer Sold-To].[Customer Sold-To].CurrentMember.Properties("SldTo City") + "&state=" + [Customer Sold-To].[Customer Sold-To].CurrentMember.Properties("SldTo Province State") + "&zipcode=" + [Customer Sold-To].[Customer Sold-To].CurrentMember.Properties("SldTo Postal Code") + "&country=US&cid=lfmaplink"
The second example has syntax that first checks to see if a particular attribute relationship exists. If so, the hyperlink opens to Google and searches on that attribute relationship. The SldTo Long Description is the attribute relationship used in the expression.
Iif([Customer Sold-To].[Customer Sold-To].CurrentMember.Properties("SldTo Long Description")=null, null, "http://www.google.com/search?hl=en&q=" + [Customer Sold-To].[Customer Sold-To].CurrentMember.Properties("SldTo Long Description"))