Desktop productivity for business analysts and programmers

Filter on a multiple value prompt???

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 17
Accepted Solution

Filter on a multiple value prompt???

Hi all,

I need to have the ability where basic sas users on EG run a project where the user selects a range of values from a list.

I have set up the prompt in prompt manager where 'user selects values from a dynamic list' and the numebr of values is Multiple Values - the data source and column are valid.

I have then set a filter in my query builder to filter in a list, contains, matches pattern etc so that te query builder filters on the prompt where the prompt is the range of values.

This is only returning me the top value in the list - looking at the log, it appears that SAS is appending a number to the of each prompt for some reason.

So help required please - how do I set up a prompt and filter whereby the user selects from a range of values and then the filter in the query builder returns the correct records depending on the range of values selected...

Many thanks in advance

Steve


Accepted Solutions
Solution
‎09-20-2012 05:17 AM
Occasional Contributor
Posts: 17

Re: Filter on a multiple value prompt???

Resolved....

Prompt Manager - enter name and prompt name

User selects from non-blank values (if applicable)

Prompt Type - select Text, User selects from dynamic list and also from multiple values

Select Datasource and datasource column for values.

Then in the query builder, bring across the columns required

Select Filter

Select column to filter by

Select in a list

Add value to be the prompt from the prompt tab

Tick the checkbox - generate filter for a prompt value

Re-select the prompt into the value box again

then next, finish and run the project/job.

The filter box should look something like this...

Filter_Prompt.jpg

View solution in original post


All Replies
Esteemed Advisor
Posts: 7,299

Re: Filter on a multiple value prompt???

Can't you just filter by "in a list"?  That automatically brings up the list of potential values and all you have to do is add the ones you want.

Occasional Contributor
Posts: 17

Re: Filter on a multiple value prompt???

Hi,

the list of potential values is contained within the prompt - I want to filter by the list of values selected by the user in the prompt when running the project.

In a list would work if I wanted the user to filter the results that way - what I want is for the user to select the values from a prompt and then the filter looks at the prompt.

Thanks

Steve

Community Manager
Posts: 2,697

Re: Filter on a multiple value prompt???

Are you looking for a way to code a filter based on the macro variables that the prompt generates?

You might need to look at the %eg_whereparam macro.  See this article by Angela:

SAS Enterprise Guide Prompting Examples using %_eg_WhereParam

Chris

Occasional Contributor
Posts: 17

Re: Filter on a multiple value prompt???

Hi Chris,

Thanks for this - I have looked at the link and associated videos - tried them this morning but to no avail...

What I am trying to do looks, on paper, to be extremely straight forward but as I have found with SAS - the simple tasks are the ones it struggles with!!!

I will continue my fruitless pursuit...

Rgds

S

Solution
‎09-20-2012 05:17 AM
Occasional Contributor
Posts: 17

Re: Filter on a multiple value prompt???

Resolved....

Prompt Manager - enter name and prompt name

User selects from non-blank values (if applicable)

Prompt Type - select Text, User selects from dynamic list and also from multiple values

Select Datasource and datasource column for values.

Then in the query builder, bring across the columns required

Select Filter

Select column to filter by

Select in a list

Add value to be the prompt from the prompt tab

Tick the checkbox - generate filter for a prompt value

Re-select the prompt into the value box again

then next, finish and run the project/job.

The filter box should look something like this...

Filter_Prompt.jpg

Super Contributor
Posts: 465

Re: Filter on a multiple value prompt???

How do you load up query builder after selecting a data source?

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 2879 views
  • 0 likes
  • 4 in conversation