Use Hyperlinks in a View

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 few 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.

Example – Open a Website and Pass View Information to Website

Example 1

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"

Example 2 and 3

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"))

Example – Run another View and Filter it with Member Information from Original View

Example 1

This example opens another view and runs it based on that view definition only. The Stratum.Viewer URL and ID for the view are used in the expression. See also Passing Parameters into Views via URL’s for additional parameters that can be used in these expressions.

“http://silvonxyz:55003/ViewWindow.aspx?ViewId=139”

Here is a view containing the hyperlink.

Here is the other view, Trending Sales for Rep, which will open and prompt you to choose a salesperson for which you want to see view data. The prompting comes from parameters tied to a level in the View Filter of the view.

 

Example 2

The previous expression is then adjusted to pass salesperson information from the original view to the other view. The hyperlink will open the view and filter it for the salesperson associated with the measure item value that was clicked.

"http://silvonxyz:55003/ViewWindow.aspx?ViewId=139&vp:Rep="+[Salesperson].[Salesperson].CurrentMember.name+ ""

The hyperlink is clicked for the measure item value of salesperson Patrick Hurley.

The trending view opens and is filtered for that particular salesperson. No prompting to choose a parameter occurs because the hyperlink determines the salesperson to use in the filter.