03-25-2013 03:42 PM
Is there a way to display different selection prompts with values from different tables dependent on what the user selected on a previous prompt? For example, a user selects a
table name from a prompt. I would then want to display the columns for that table in a subsequent prompt, but not all columns from all tables that the user could select from.
03-26-2013 12:01 PM
Here is one example that may help....
if you edit and run the following code you should have created 2 tables to give you a list of tables in the sashelp library and the full contents of the library, before continuing you will need to register these somewhere in your metadata.
libname myLib BASE 'path on server';
proc contents data=sashelp._all_ out=myLib.Lib_Contents noprint;
proc sql noprint;
create table myLib.Table_List as
select distinct memname from myLib.Lib_Contents;
then when you create your stored process, under prompts create the first prompt to be text and 'user selects data from a dynamic list' and use the Table_list table as the data source.
create another prompt in the same way using the Lib_Contents table as the data source and you want the unformatted values to be the NAME column, on this prompt go to the dependencies tab and set it up so that the value of the first prompt is equal to the value of the MEMNAME column.
when you run it it should be set up so that after selecting a table in the first prompt the second prompt only shows columns for that table.
If you have any more questions about this please ask.