Your SAS programs, embedded in web apps and elsewhere

Multi select prompt

Reply
Contributor
Posts: 73

Multi select prompt

Hi there

I have a little problem because I use a 9.2 EBI environment and a client needs me on a EG 4.1 stored process course.

I have a little question about the prompt and I cannot test : In EG 4.2 I can create a SP with a prompt that let the possibility to the user to select multiple values at the beginning on the list provided. With these selection the query will send the results.

Is it possible to define a multi select prompt in a SP with EG 4.1 (ie. a 9.1 environment) ?

Thanks for your help.

Stéphane.
SAS Employee
Posts: 286

Re: Multi select prompt

Yes, you can create a multi-value parameter in SAS 9.1. Using SAS Enterprise Guide 4.1, the steps are as follows:

1. In the Stored Process Wizard, click Add > New Parameters to open the Add Parameters dialog.

2. Give the parameter a name and label. For example, name it MULTI.

3. Click the Constraints tab. Type in the display and return values. For example, "A", "B", and "C". Click the Allow multiple selections radio button. Optionally, specify the minimum and maximum number of selections allowed.

4. Click Finish.

There are some difference between SAS 9.1 and SAS 9.2.

In SAS 9.1, multi-value prompts are generally not supported by the SAS Workspace server
(see http://support.sas.com/kb/31/155.html).

In SAS 9.1, the values are returned according to how they are ordered in the list, but in SAS 9.2, they are returned in the order selected.

For example, if the items in the list are entered as "A", "B", and "C", and you choose "C", and then "A", you get these results:

SAS 9.1

MULTI1=A
MULTI2=C

SAS 9.2

MULTI1=C
MULTI2=A

Vince DelGobbo
SAS R&D
Ask a Question
Discussion stats
  • 1 reply
  • 251 views
  • 0 likes
  • 2 in conversation