BookmarkSubscribeRSS Feed
a_SAS_sin
Fluorite | Level 6

Hi everyone

 

I am using VA 7.5 and the method described here (https://www.zencos.com/blog/sas-va-tip-download-source-data-stp) to generate a pdf based on the values selected on my VA report.

The method in the hyperlink works perfectly when I want to send single values to the stored process url parameters from a parameter associated with objects with only 1 value.

My problem occurs when the value I want to send to the URL parameter has multiple values. I.e., I have a list object and a parameter associated with it and I want to send this report parameter to the url link of the stored project as  a parameter. 

 

Using the method described above does not work because I cannot create a calculated item that combines all the multiple values selected into a single string

 

I then thought of adding a text object and build the complete stored process link with the parameters and ask the user to simply copy it and paste it on the browser. The url text shows just as it should however, when using the report in Viewer Mode we cannot copy any text from it.

 

Did you ever face this issue? How did you solve it?

(Please do not forget that I am using VA 7.5 )

 

Thanks in advance,

Julio

4 REPLIES 4
KeithM
SAS Employee

There is not a way to parse the contents of a multi select parameter.  Your idea of a text entry is definitely feasible.  Here is an example below:

1. Create a new report.  Add a Text Entry object.  Add a parameter to that.  (This will represent what you are adding to the URL)

2. Add a list table to the report.

3. Create a calculated item to represent the URL that you want to call.    concatenate the url with the parameter values.

KeithM_0-1707502840008.png

4. Add that data item to your list table.

5. Set an action on the list table for external URL.   Here is the trick, do not enter a URL.  ONLY add the new item you created in step #3.

KeithM_1-1707502972884.png

 

Test Report:

A. In my example, I type in "superbowl hotels" in the text box and select enter.

B. I then see that the MyString data item on the list table updates.

KeithM_2-1707503123999.png

C.  Double click on the MyString value and the link will open.  (Note, the syntax for google is incorrect, but you could easily modify that)

 

a_SAS_sin
Fluorite | Level 6

Thanks for your reply @KeithM

 

Your solution can work, but my stored process might have many parameters, and asking the end user to type them by hand is unfeasable.

 

With the solution I proposed using the text object, I can build the correct URL and even display it on a text object. Please have a look at the following image:

a_SAS_sin_1-1707729236249.png

 

If in view mode the user could simply copy the generated URL my problem would be solved. Is there a way of allowing the user to select text from the Text object?

 

Another weird thing is, why can I add the parameter to the Text object and it displays exactly as I need it but why can't I be able to use it as a concatenated string in that exact format in any other object? Isn't there a way to convert the list object into a concatenated string as displayed in the image above?

KeithM
SAS Employee

You only need a Text Entry for parameters that would have multiple selection.  If most of your other parameters are single selection then you can add them as parameters to the external url assigned to the list table.

Example:

We have a cars report with text entry and 3 single selection list boxes.  The List table is filtered.  The stored process is triggered by clicking on the row in the list table.

KeithM_3-1707762122598.png

 

 

1.  The External URL for the list table would look like the following:

KeithM_2-1707762097585.png

2. When a user clicks on a row of the list table, the following URL is generated.

https://www.google.com/?Color=Green+Blue+Red&Make=Acura&Model=+3.5+RL+4dr&Origin=Asia

 

Note:  Within your stored process, you can reference Make, Model, and Origin directly.  For Color, you would need to parse that out and separate in your SAS code.

 

 

a_SAS_sin
Fluorite | Level 6

Hi @Keith 

 

I understood your solution but, in my real-world case, the report user can select/input 20 or 30 codes (simple IDs). Being these codes simple IDs with no meaning to the user, inserting them by hand on a text box is not feasible.

 

As I said before and can be seen in the print screen I sent, it is just weird that we cannot use the link correctly generated in the text object.

 

Is there a solution that does not involve manually inputting the values?

 

Thanks

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4 replies
  • 426 views
  • 0 likes
  • 2 in conversation