BookmarkSubscribeRSS Feed
AshleyP
Calcite | Level 5

Hi, I am new to SAS VA, using v7.1

I am trying to create a report with a hyperlink against each row of data, so that when the hyperlink is clicked it will take the user to a particular web page.

I presume the best way to do this is to right mouse on my column, for example 'Product Name', then select Add Link, External Link. However, I need to add some logic to say something like,

if the 'Product Name' = 'A', then the external hyperlink is https://productA,

if the 'Product Name' = 'B', then the external hyperlink is https://productB,

etc

Do I need to add a 'Link to Stored Process'? If so, how and where do I create a Stored Process?

Or is there a better way to do this?

Thanks.

12 REPLIES 12
RickStyll_SAS
SAS Employee

Ashley,

You are on the right track. When you create an external link, you can include a data driven portion, but the initial part of the URL must by static.  The entire URL can not be data driven in the current and prior releases.  If you have a portion of the URL that is consistent, you can type that in and pass the dynamic portion by choosing a data item from the parameter drop-down list in the Create External Link window. Note that this data item can be a calculated data item that you create in the report. The target for the parameter portion of the parameter is optional, and I suspect you would leave that blank in your case.

You'll need to create a calculated data item from the data tab in the left panel that includes your IF THEN ELSE logic. I'm assuming you have more than two products, so you would need to nest IF THEN ELSE statements if you use this approach. If you have many products, you might want to consider storing the dynamic portion of the URL for the product in the source table. If the product name is the only portion of the URL that's dynamic and the URL is based on the product name, you can use string functions, like LowerCase() and URLEncode() that might let you create the dynamic URL portion in an expression without any IF THEN ELSEs.

Here's a few links to the  relevant portions of the VA User's Guide for 7.2, just in case. This works the same in 7.1 and earlier releases.

SAS(R) Visual Analytics 7.2: User's Guide - Create a Link to an External URL

SAS(R) Visual Analytics 7.2: User's Guide - Text (Simple) Operators (see LowerCase)

SAS(R) Visual Analytics 7.2: User's Guide - Text (Advanced) Operators (see URLEncode)

Ashley, I hope this helps. Post back if you get stuck or have other questions.

Rick Styll

WKruk
Fluorite | Level 6

@RickStyll_SAS: I have looked for a solution how to click on an individual  row in a list table with an url as text value which is an external link to a pdf document. Your tip looks promising but I have no idea how to  apply it.  It's too advanced for me. Could you be so kind and write more details about creating such calculated item consisted of static and dynamic parts of url? A few screen shots would be very helpful for me. I have searched VA guide but there were no simple tutorial how to do this...

I use 7.1 version of VA.

 

Thank you in advance 🙂

 

 

RickStyll_SAS
SAS Employee

You mentioned you searched the VA User's Guide and couldn't find a simple tutorial. Just in case you didn't see this part, you might find the section of the documentation at this link helpful.

 

SAS(R) Visual Analytics 7.2: User's Guide - Create a Link to an External URL

 

To create a link to an external PDF from a list table, you'll need to go to the interactions tab in the right panel. From there, click the New option and select External Link from the drop-down.

 

 Create New External Link

 

Next, you will see a pop-up window where you can enter the static portion of the URL.

 

Screen Shot 2016-03-25 at 5.17.20 PM.png

 

From there, click the plus symbol, labeled Add a new parameter. Then you'll see...

 

Select Data Item for Dynamic URL Portion

 

Choose a data item for the source drop-down selector that represents the portion of the URL that is different for each row of your list table. If your source data contains the full URL, you might need to create a calculated data item in the left panel to truncate the portion of the URL that is the same for every row. The portion that's the same is what you'll type into the URL field near the top of this pop-up window.

 

@WKruk, I hope this helps.

 

Rick

WKruk
Fluorite | Level 6

@RickStyll_SAS: thank you for your guide. It's really helpful! Best regards 🙂 

Waldek

ijafri
Calcite | Level 5

Is there a way to do this so it links to a bar, line, or data point in a graph. Currently I can only do this in List Tables.

Thanks!

india2016
Pyrite | Level 9

I am facing same problem. I also wanted to apply hyperlink in list table with the text value.

Can you please tell me the solution which you applied ?

JuanS_OCS
Amethyst | Level 16

Hello @india2016,

 

could you read and try the solution provided by @RickStyll_SAS ? Generally, that is the solution to the question

india2016
Pyrite | Level 9

JuanS_OCS
Amethyst | Level 16

Hello @india2016,

 

thanks for your answer. Well, I understand the part that you "don't want to create stored processes", however, I believe that is the best practice (and probably the only way in SAS VA 7.X).

 

SAS VA 8.X (in Viya platform) can show URLs without stored processes, as far as I know.

india2016
Pyrite | Level 9
@JuanS_OCS Thanks for you answer.
AKS4
Calcite | Level 5

Hello all,

 

I am trying to implement the solution. I have 10 rows in the List table and I want to redirect these 10 rows to 10 different reports in SAS VA when the user select or click on the row. With the below solution I was able to link only one report and when I click any row from 1 to 10 all redirects to the same report. Can someone help me what I am doing wrong? I want to redirect the 10 rows to 10 different SAS VA reports which I already created. Appreciate your help.

 

Note: I don't want to create in Text object. I want to create the links in List Table and my table looks like the below screenshot.

 

1.PNG

Joy_SAS
SAS Employee

Hi AKS4,

 

You don't mention which version you're using, but I'm guessing it's one of the 7.x releases. There's documentation for creating report links in VA 7.4. Unfortunately, you cannot create report links in a list table.

 

Regards,

Joy 

 

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 12 replies
  • 8614 views
  • 4 likes
  • 8 in conversation