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.
> I would like the questions to be dynamic
Where do the questions and drop-down lists appear? In a browser in an HTML form?
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
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.