BookmarkSubscribeRSS Feed
JackieR
Calcite | Level 5

Hi all

 

i have a list of questions with a number of various answers in a SAS dataset and i am creating a stored procedure where i need to list the questions with their respective drop down list for the user to select an answer. 

 

The data looks as follows:

Q_ID       Question      Drop down selection

1              Question1      Selection1

1              Question1      Selection2

1              Question1      Selection3

2              Question2      Selection1

2              Question2      Selection2

2              Question2      Selection3

3              Question3      Selection1

3              Question3      Selection2

 

 

I would like the questions to be dynamic in that if a value on the table is changed, it would reflect on the stored proc. I would not want to hard code 100 odd questions each time a value changes.

 

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

> I would like the questions to be dynamic 

Where do the questions and drop-down lists appear? In a browser in an HTML form?

andreas_lds
Jade | Level 19

You can use datasets as source for drop-down-lists, the datasets have to be registered in the metadata. This is documented in the Stored Processes: Developer’s Guide 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1474 views
  • 0 likes
  • 3 in conversation