BookmarkSubscribeRSS Feed
DonH
Lapis Lazuli | Level 10
I have a questions about using prompts in the Query Builder task in EG 4.3.

There are a number of standard prompts that will apply to virtually all reports my users wants to use EG for. In looking at the Query Builder task, it appears that it supports prompts since the UI for the Query task includes an option for the Prompt Manager. Note that I don't want the user to use the built-in subset generator for these prompts as the data sets are very large and the number of distinct values is small - and the prompts I need to add will be used for most/all of their reports.

However when I created a task and added a prompt, the task does not seem to use it. The query window appears where I select the value I want, but the generated code does not seem to use it. I am hoping that there is just a step in the process that I am missing.

Here is what I’ve done:
1. Added a query builder task to the process flow
2. Clicked on Prompt Manager and defined/saved a prompt
2. a. Specified that the user selects from a static list
2. b. I used get values to populate the list from a data set (used sashelp.class)
3. Selected Options and selected Prompts and added my prompt to the task.
4. Added variables to the query
5. Hit Save and Close
6. I then ran the task and the prompt window (asking me to select a value for Sex) appeared. I selected a value and ran the task.

But the output data set contains all the rows. When I look at the code for the query, it is not using the prompt.

Any insights/suggestions on what I am doing wrong? Note that I tried it choosing both with/without the prompt option “Use prompt value throughout the project” and neither choice used the prompt.
1 REPLY 1
DonH
Lapis Lazuli | Level 10
Well I think I figured it out finally. Thanks to Google I found this paper:

http://support.sas.com/resources/papers/proceedings11/309-2011.pdf

which had a screen shot showing that a macro call was used in the prompt. With a bit of experimentation, I finally found the steps needed to apply the filter. Once the prompt is defined to the task here is what I did:

1. Selected the filter tab.
2, Selected the add a filter icon and selected a basic filter (Step 1 of the Wizard)
3. Selected the variable (Step 2 of the Wizard).
4. In Step 3 of the Wizard there is a down arrow to the right of the Value field and selecting that brings up another window where you can select a prompt (third tab in this secondary window).
5. It appears you have to double click the prompt as there is only a Cancel button.

The above steps resulted in my prompt being used.

But now two editorial comments.

First, this is a very, very, very nice facility.

Second, it is not at all intuitive. It was only by pure chance that I found the right set of clicks to get the filter to be used. Since there is a checkbox in that UI for "Generate a filter for a prompt value (only applies to prompt types)" perhaps selecting that checkbox should open the prompt tab in that secondary window.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 884 views
  • 0 likes
  • 1 in conversation