BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shudsoo
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
shudsoo
Calcite | Level 5

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

6 REPLIES 6
art297
Opal | Level 21

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.

shudsoo
Calcite | Level 5

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

ChrisHemedinger
Community Manager

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
shudsoo
Calcite | Level 5

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

shudsoo
Calcite | Level 5

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

DavidPhillips2
Rhodochrosite | Level 12

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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