Your SAS programs, embedded in web apps and elsewhere

Selection Prompts

Reply
Occasional Contributor
Posts: 10

Selection Prompts

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.

Contributor
Posts: 46

Re: Selection Prompts

Hi Bluedog,

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;

run;

proc sql noprint;

     create table myLib.Table_List as

     select distinct memname from myLib.Lib_Contents;

quit;

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.

Tim.

Occasional Contributor
Posts: 10

Re: Selection Prompts

Posted in reply to TimCampbell

Thanks!  That is very helpful.  I also have a better understanding of cascading prompts that I previously didn't think could handle this.

Ask a Question
Discussion stats
  • 2 replies
  • 322 views
  • 0 likes
  • 2 in conversation