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.
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
@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 🙂
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.
Next, you will see a pop-up window where you can enter the static portion of the URL.
From there, click the plus symbol, labeled Add a new parameter. Then you'll see...
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
@RickStyll_SAS: thank you for your guide. It's really helpful! Best regards 🙂
Waldek
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!
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 ?
Hello @india2016,
could you read and try the solution provided by @RickStyll_SAS ? Generally, that is the solution to the question
@JuanS_OCS I have checked this but I don't want to create stored process.
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.
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.
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.