1 Chapter 6: Using Prompts in Tasks and Queries 6.1 Prompting in Projects 6.2 Creating and Using...

Post on 14-Jan-2016

214 views 0 download

Transcript of 1 Chapter 6: Using Prompts in Tasks and Queries 6.1 Prompting in Projects 6.2 Creating and Using...

1

Chapter 6: Using Prompts in Tasks and Queries

6.1 Prompting in Projects

6.2 Creating and Using Prompts in Tasks

6.3 Creating and Using Prompts in Queries

2

Chapter 6: Using Prompts in Tasks and Queries

6.1 Prompting in Projects6.1 Prompting in Projects

6.2 Creating and Using Prompts in Tasks

6.3 Creating and Using Prompts in Queries

3

Objectives Define a prompt. Illustrate examples of prompts.

4

PromptsPrompts enable you to request input from the user when a task, query, or SAS program is run.

Internet Sales

5

Prompt ExamplesPossible prompts include the following:

Datevalues

Variable lists

Text ornumeric entry

Single or multipleselection from a list

6

Prompt ManagerPrompts are stored within a project. You can use the Prompt Manager section of the Resources pane to create, edit, and delete prompts. You can define prompts that require the user to select or type one or more values when a query or task is run.

7

8

Setup for the Poll1. Open the e106a01.egp project.

2. Select Yes when you are prompted to run the Autoexec process flow.

3. In the Specify Values for Project Prompts window, do the following: From the Customer Age Group menu, select

31-45 years. In the Orders with profits exceeding field,

type 100.

4. Run the query.

9

6.01 Multiple Choice PollHow many rows were returned in the query result?

a. 0

b. 58

c. 76

d. 617

10

6.01 Multiple Choice Poll – Correct AnswerHow many rows were returned in the query result?

a. 0

b. 58

c. 76

d. 617

Partial Results

11

Chapter 6: Using Prompts in Tasks and Queries

6.1 Prompting in Projects

6.2 Creating and Using Prompts in Tasks6.2 Creating and Using Prompts in Tasks

6.3 Creating and Using Prompts in Queries

12

Objectives List steps for adding a prompt to a task. Define general prompt properties. Define the prompt type and values. Retrieve prompt values from a data source. Use prompts in a task.

13

Business ScenarioThe CEO at Orion Star would like the ability to view a pie chart that illustrates the distribution of profit based on different categories. Rather than creating a separate pie chart for each category, he wants to be able to access a single task, but choose, at run time, the variable to analyze.

14

Prompts in TasksAdding a prompt to a task is a two-step process.

1. Create a prompt.

2. Use the prompt definition in a task.

15

Creating a PromptYou can create prompts by accessing the Prompt Manager in the Resources pane.

Select Add to begincreating a new prompt.

16

Creating a Prompt: GeneralWhen you create a prompt, you must first specify the general properties of the prompt, such as the name, displayed text, description, and options.

17

18

6.02 Multiple Answer PollWhich of the following are valid names for prompts?

a. Select Country

b. Select_a_Category

c. Profit$Segments

d. 1stQtrValues

e. Qtr1Values

19

6.02 Multiple Answer Poll – Correct AnswersWhich of the following are valid names for prompts?

a. Select Country

b. Select_a_Category

c. Profit$Segments

d. 1stQtrValues

e. Qtr1Values

Names can contain only alphanumeric characters and underscores, cannot begin with a number, and cannot exceed 32 characters.

20

Creating a Prompt: Prompt Type and ValuesBy selecting Variable as the Prompt type, you can assign the prompt to task roles in tasks.

The prompt value list can be populated by the variable names from an existing data source.

21

Using a Prompt: Variable TypeVariable type prompts appear in tasks as an additional variable that can be assigned to task roles or used in titles and footnotes.

22

Prompting in Tasks

This demonstration illustrates how to create a variable prompt for use in a task.

23

24

Exercise

This exercise reinforces the concepts discussed previously.

25

26

Chapter 6: Using Prompts in Tasks and Queries

6.1 Prompting in Projects

6.2 Creating and Using Prompts in Tasks

6.3 Creating and Using Prompts in Queries6.3 Creating and Using Prompts in Queries

27

Objectives List prompt types that can be used in query filters. Retrieve prompt values from a data source. Use prompts in a query.

28

Business ScenarioSuppliers frequently request a summary of the orders placed on their products. Rather than creating a task or report for each supplier, the supplier services representative at Orion would like to be able to create a report by choosing a particular supplier at run time.

29

Using a Prompt: Text, Numeric, Date TypesText, numeric, and date type prompts can be used in the Query Builder to filter data.

30

Creating a Prompt in the Query BuilderYou can create prompts by accessing the Prompt Manager directly in the Query Builder.

31

Creating a Prompt for a QueryText, numeric, date, and time prompt types can be used to enable the selection of values to be used in a filter.

Select Get Values… to load data values from an existing data source into the prompt list.

32

Prompting in Queries

This demonstration illustrates how to create a prompt for use in a query.

33

34

Exercise

This exercise reinforces the concepts discussed previously.

35

36

Chapter Review1. Is a prompt only available in the project where

it is defined?

 

2. How do you access the Prompt Manager?

37

Chapter Review Answers1. Is a prompt only available in the project where

it is defined?

Yes

 

2. How do you access the Prompt Manager?

The Prompt Manager can be accessed from the Resources pane in the lower left corner or in the Query Builder.

38

Chapter Review3. Name the different types of prompts that can

be created.

4. After you create a prompt, what must be done to have the prompt appear?

39

Chapter Review Answers3. Name the different types of prompts that can

be created.

4. After you create a prompt, what must be done to have the prompt appear?

Prompt types include variable, text, numeric, and date.

The prompt must be used in a task or query, either by assigning it to a task role or using it in a filter.